Change in ...osmo-ggsn[master]: configure.ac: some versions of linux/if.h require including sys/socket.h

pespin gerrit-no-reply at lists.osmocom.org
Mon Jul 1 10:31:26 UTC 2019


pespin has submitted this change and it was merged. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/14624 )

Change subject: configure.ac: some versions of linux/if.h require including sys/socket.h
......................................................................

configure.ac: some versions of linux/if.h require including sys/socket.h

Related: OS#3230
Change-Id: Iba869a75745cea01024fa3ce04917c02fa608a13
---
M configure.ac
1 file changed, 6 insertions(+), 2 deletions(-)

Approvals:
  fixeria: Looks good to me, approved; Verified
  Jenkins Builder: Verified



diff --git a/configure.ac b/configure.ac
index 5581c32..7b985b9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -74,8 +74,12 @@
 AC_HEADER_SYS_WAIT
 AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h stdint.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h unistd.h])
 
-# Check for if header
-AC_CHECK_HEADERS([linux/if.h net/if.h])
+# Check for if header. Some versions of linux/if.h fail without sys/socket.h included beforehand:
+# see https://algorithmicallyrandom.blogspot.com/2012/07/error-on-including-include.html
+AC_CHECK_HEADERS([linux/if.h net/if.h], [], [], [#ifdef HAVE_SYS_SOCKET_H
+                                                # include <sys/socket.h>
+                                                # endif
+                                                ])
 
 # Check for tun header
 AC_CHECK_HEADERS([linux/if_tun.h net/if_tun.h])

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/14624
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Change-Id: Iba869a75745cea01024fa3ce04917c02fa608a13
Gerrit-Change-Number: 14624
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: laforge <laforge at gnumonks.org>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190701/62827166/attachment.html>


More information about the gerrit-log mailing list