summaryrefslogtreecommitdiffstats
path: root/src/civetweb/cmake/check
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 18:24:20 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 18:24:20 +0000
commit483eb2f56657e8e7f419ab1a4fab8dce9ade8609 (patch)
treee5d88d25d870d5dedacb6bbdbe2a966086a0a5cf /src/civetweb/cmake/check
parentInitial commit. (diff)
downloadceph-483eb2f56657e8e7f419ab1a4fab8dce9ade8609.tar.xz
ceph-483eb2f56657e8e7f419ab1a4fab8dce9ade8609.zip
Adding upstream version 14.2.21.upstream/14.2.21upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/civetweb/cmake/check')
-rw-r--r--src/civetweb/cmake/check/c82fe8888aacfe784476112edd3878256d2e30bc.patch31
-rw-r--r--src/civetweb/cmake/check/patch.cmake12
2 files changed, 43 insertions, 0 deletions
diff --git a/src/civetweb/cmake/check/c82fe8888aacfe784476112edd3878256d2e30bc.patch b/src/civetweb/cmake/check/c82fe8888aacfe784476112edd3878256d2e30bc.patch
new file mode 100644
index 00000000..e16ea1f5
--- /dev/null
+++ b/src/civetweb/cmake/check/c82fe8888aacfe784476112edd3878256d2e30bc.patch
@@ -0,0 +1,31 @@
+From c82fe8888aacfe784476112edd3878256d2e30bc Mon Sep 17 00:00:00 2001
+From: Joshua Boyd <jdboyd@Joshua-Boyds-Mac-mini.local>
+Date: Wed, 23 Mar 2016 17:54:41 -0400
+Subject: [PATCH] Detect missing itimerspec on OSX.
+
+Set define to compiler accordingly.
+
+This fixes cmake on osx support.
+---
+ CMakeLists.txt | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e271e31..1d413e8 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -193,6 +193,14 @@ if(NOT HAVE_SYS_TIME_H)
+ endif(MSVC)
+ endif(NOT HAVE_SYS_TIME_H)
+
++# OSX has sys/time.h, but it still lacks itimerspec
++if(HAVE_SYS_TIME_H)
++ check_struct_member("struct itimerspec" it_value "sys/time.h" HAVE_STRUCT_ITIMERSPEC_IT_VALUE)
++ if(NOT HAVE_STRUCT_ITIMERSPEC_IT_VALUE)
++ add_definitions(-DSTRUCT_ITIMERSPEC_DEFINITION_MISSING=1)
++ set(STRUCT_ITIMERSPEC_DEFINITION_MISSING 1)
++ endif(NOT HAVE_STRUCT_ITIMERSPEC_IT_VALUE)
++endif(HAVE_SYS_TIME_H)
+
+ ###############################################################################
+ # Check for integer types
diff --git a/src/civetweb/cmake/check/patch.cmake b/src/civetweb/cmake/check/patch.cmake
new file mode 100644
index 00000000..472d392b
--- /dev/null
+++ b/src/civetweb/cmake/check/patch.cmake
@@ -0,0 +1,12 @@
+message(STATUS "Patching check ${VERSION} ${SOURCE_DIR}")
+
+# Patch checks for MinGW
+# https://sourceforge.net/p/check/patches/53/
+set(CMAKE_LISTS_LOCATION "${SOURCE_DIR}/CMakeLists.txt")
+file(READ ${CMAKE_LISTS_LOCATION} CMAKE_LISTS)
+string(REGEX REPLACE
+ "(check_type_size\\((clock|clockid|timer)_t [A-Z_]+\\)[\r\n]+[^\r\n]+[\r\n]+[^\r\n]+[\r\n]+endif\\(NOT HAVE[A-Z_]+\\))"
+ "set(CMAKE_EXTRA_INCLUDE_FILES time.h)\n\\1\nunset(CMAKE_EXTRA_INCLUDE_FILES)"
+ CMAKE_LISTS "${CMAKE_LISTS}")
+file(WRITE ${CMAKE_LISTS_LOCATION} "${CMAKE_LISTS}")
+message(STATUS "Patched ${CMAKE_LISTS_LOCATION}")