diff options
author | Guy Harris <guy@alum.mit.edu> | 2018-05-30 13:35:04 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-05-30 20:35:39 +0000 |
commit | a5d3079b07df552e2e0a1f7879a2b8e4d070548c (patch) | |
tree | 2fcd52a93c7b591ee3881db6c6001c2e35929e2e /ConfigureChecks.cmake | |
parent | 031dc5dfc46a961f5e637785e19f8e2539293692 (diff) |
ifaddrs.h may require sys/types.h to be included first.
That's the case on DragonFly BSD 5.2.1, at least.
Change-Id: I8bbd51462d74380004c611183f4b9229f4d20ff6
Reviewed-on: https://code.wireshark.org/review/27913
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ConfigureChecks.cmake')
-rw-r--r-- | ConfigureChecks.cmake | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index f6bf312b66..e9b793ffd9 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -11,22 +11,26 @@ include(CMakePushCheckState) #check system for includes include(CheckIncludeFile) -check_include_file("arpa/inet.h" HAVE_ARPA_INET_H) -check_include_file("fcntl.h" HAVE_FCNTL_H) -check_include_file("getopt.h" HAVE_GETOPT_H) -check_include_file("grp.h" HAVE_GRP_H) -check_include_file("ifaddrs.h" HAVE_IFADDRS_H) -check_include_file("netinet/in.h" HAVE_NETINET_IN_H) -check_include_file("netdb.h" HAVE_NETDB_H) -check_include_file("pwd.h" HAVE_PWD_H) -check_include_file("sys/ioctl.h" HAVE_SYS_IOCTL_H) -check_include_file("sys/select.h" HAVE_SYS_SELECT_H) -check_include_file("sys/socket.h" HAVE_SYS_SOCKET_H) -check_include_file("sys/sockio.h" HAVE_SYS_SOCKIO_H) -check_include_file("sys/time.h" HAVE_SYS_TIME_H) -check_include_file("sys/utsname.h" HAVE_SYS_UTSNAME_H) -check_include_file("sys/wait.h" HAVE_SYS_WAIT_H) -check_include_file("unistd.h" HAVE_UNISTD_H) +include(CheckIncludeFiles) +check_include_file("arpa/inet.h" HAVE_ARPA_INET_H) +check_include_file("fcntl.h" HAVE_FCNTL_H) +check_include_file("getopt.h" HAVE_GETOPT_H) +check_include_file("grp.h" HAVE_GRP_H) +# +# This may require <sys/types.h> to be included +# +check_include_files("sys/types.h;ifaddrs.h" HAVE_IFADDRS_H) +check_include_file("netinet/in.h" HAVE_NETINET_IN_H) +check_include_file("netdb.h" HAVE_NETDB_H) +check_include_file("pwd.h" HAVE_PWD_H) +check_include_file("sys/ioctl.h" HAVE_SYS_IOCTL_H) +check_include_file("sys/select.h" HAVE_SYS_SELECT_H) +check_include_file("sys/socket.h" HAVE_SYS_SOCKET_H) +check_include_file("sys/sockio.h" HAVE_SYS_SOCKIO_H) +check_include_file("sys/time.h" HAVE_SYS_TIME_H) +check_include_file("sys/utsname.h" HAVE_SYS_UTSNAME_H) +check_include_file("sys/wait.h" HAVE_SYS_WAIT_H) +check_include_file("unistd.h" HAVE_UNISTD_H) # # On Linux, check for some additional headers, which we need as a |