aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/libxml2/fix_ios_compilation.patch
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/libxml2/fix_ios_compilation.patch')
-rw-r--r--vcpkg/ports/libxml2/fix_ios_compilation.patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/vcpkg/ports/libxml2/fix_ios_compilation.patch b/vcpkg/ports/libxml2/fix_ios_compilation.patch
new file mode 100644
index 0000000..2d8859c
--- /dev/null
+++ b/vcpkg/ports/libxml2/fix_ios_compilation.patch
@@ -0,0 +1,18 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b952d7bf..d555d25a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -134,7 +134,12 @@ check_c_source_compiles("
+ f(void) {}
+ int main(void) { return 0; }
+ " HAVE_FUNC_ATTRIBUTE_DESTRUCTOR)
+-check_symbol_exists(getentropy "sys/random.h" HAVE_DECL_GETENTROPY)
++if (APPLE)
++ # In old macOS SDKs (ex: 10.15), sys/random.h fails to include header files it needs, so add them here.
++ check_symbol_exists(getentropy "Availability.h;stddef.h;sys/random.h" HAVE_GETENTROPY)
++else()
++ check_symbol_exists(getentropy sys/random.h HAVE_GETENTROPY)
++endif()
+ check_symbol_exists(glob "glob.h" HAVE_DECL_GLOB)
+ check_symbol_exists(mmap "sys/mman.h" HAVE_DECL_MMAP)
+ check_include_files(stdint.h HAVE_STDINT_H)