Skip to content

Commit

Permalink
Merge pull request #6 from GeniusVentures/master
Browse files Browse the repository at this point in the history
Fix iOS compatibility
  • Loading branch information
rhuijben authored Jun 17, 2024
2 parents 96b4b58 + 9aec236 commit 35fe984
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ if(HAVE_UTIME)
add_definitions(-DHAVE_UTIME=1)
endif()

check_function_exists(mremap HAVE_MREMAP)
check_symbol_exists(mremap "sys/mman.h" HAVE_MREMAP)
if(HAVE_MREMAP)
add_definitions(-DHAVE_MREMAP=1)
endif()
Expand All @@ -156,11 +156,11 @@ if(HAVE_LSTAT)
endif()

check_function_exists(gethostuuid HAVE_GETHOSTUUID)
if(HAVE_GETHOSTUUID)
if(HAVE_GETHOSTUUID AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL "iOS")
add_definitions(-DHAVE_GETHOSTUUID=1)
endif()

check_function_exists(posix_fallocate HAVE_POSIX_FALLOCATE)
check_symbol_exists(posix_fallocate "fcntl.h" HAVE_POSIX_FALLOCATE)
if(HAVE_POSIX_FALLOCATE)
add_definitions(-DHAVE_POSIX_FALLOCATE=1)
endif()
Expand Down

0 comments on commit 35fe984

Please sign in to comment.