From 32909a57f9fb131eab8971a6d9845b55bbcb9091 Mon Sep 17 00:00:00 2001
From: Tom Lane <tgl@sss.pgh.pa.us>
Date: Tue, 23 Aug 2016 16:25:35 -0400
Subject: [PATCH] Fix network_spgist.c build failures from missing AF_INET
 definition.

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 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/backend/utils/adt/network_spgist.c b/src/backend/utils/adt/network_spgist.c
index 708ae899ac6..a198a83973b 100644
--- a/src/backend/utils/adt/network_spgist.c
+++ b/src/backend/utils/adt/network_spgist.c
@@ -31,6 +31,8 @@
  */
 #include "postgres.h"
 
+#include <sys/socket.h>
+
 #include "access/spgist.h"
 #include "catalog/pg_type.h"
 #include "utils/inet.h"
-- 
GitLab