changeset 157:cd83eec51b62

fix openbsd
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 04 Jan 2018 19:05:10 +0100 (2018-01-04)
parents b4c17acb5dca
children d4fefd843035
files Resources/CMake/PostgreSQLConfiguration.cmake
diffstat 1 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Resources/CMake/PostgreSQLConfiguration.cmake	Thu Jan 04 17:39:08 2018 +0100
+++ b/Resources/CMake/PostgreSQLConfiguration.cmake	Thu Jan 04 19:05:10 2018 +0100
@@ -216,7 +216,17 @@
     check_include_file("netinet/tcp.h" HAVE_NETINET_TCP_H)
     check_include_file("sys/ioctl.h" HAVE_SYS_IOCTL_H)
     check_include_file("sys/un.h" HAVE_SYS_UN_H)
-        
+
+    If (NOT HAVE_NET_IF_H)  # This is the case of OpenBSD
+      unset(HAVE_NET_IF_H CACHE)
+      check_include_files("sys/socket.h;net/if.h" HAVE_NET_IF_H)
+    endif()
+
+    if (NOT HAVE_NETINET_TCP_H)  # This is the case of OpenBSD
+      unset(HAVE_NETINET_TCP_H CACHE)
+      check_include_files("sys/socket.h;netinet/tcp.h" HAVE_NETINET_TCP_H)
+    endif()
+
 
     execute_process(
       COMMAND