Fix network_spgist.c build failures from missing AF_INET definition.
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 23 Aug 2016 20:25:35 +0000 (16:25 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 23 Aug 2016 20:25:35 +0000 (16:25 -0400)
AF_INET is apparently defined in something that's pulled in automatically
on Linux, but the buildfarm says that's not true everywhere.  Comparing
to network_gist.c suggests that including <sys/socket.h> ought to fix it,
and the POSIX standard concurs.

src/backend/utils/adt/network_spgist.c

index 708ae899ac62ac5bbc394150bcea997f33b8fd4f..a198a83973b8ff95e99180140679d881b6a0e465 100644 (file)
@@ -31,6 +31,8 @@
  */
 #include "postgres.h"
 
+#include <sys/socket.h>
+
 #include "access/spgist.h"
 #include "catalog/pg_type.h"
 #include "utils/inet.h"