birdofpreyru/lighttpd1.4

[Upstream] `posix_spawn_file_actions_addfchdir_np()` issue in iOS and Mac Catalyst builds

Closed this issue · 2 comments

Hey @gstrauss , let's coninue the discussion here.

??? in case of what ??? what does that mean ???

I mean, in case you consider it is worth doing anything about it in upstream codebase (as iOS is not a high-priority target for you, and I am not 100% sure it is not some mistake in my setup causing CMake finding this funciton).

MacOS Catalyst (whatever that is)

Mac Catalyst is an Apple's solution for building iOS apps for Mac.

if you provide the preprocessor macros for version identification when it works (or iOS platform identification to disable, i.e. TARGET_OS_IPHONE)

I haven't tried to solve it with preprocessor macros, but I guess you are right, #if !TARGET_OS_IPHONE should do the trick, as it seems to cover both iOS and Mac Catalyst targets.

For me I fixed it by modifying CMakeLists.txt, but I guess CMAKE_SYSTEM_NAME MATCHES "Darwin" piece will also remove it for proper Mac OS builds, not something you will like:

if(NOT CMAKE_SYSTEM_NAME MATCHES "iOS"
AND NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
check_function_exists(posix_spawn_file_actions_addfchdir_np HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR_NP)
endif()

Is lighttpd failing during compilation and linking?

It fails during the compilation and linking.

For me I fixed it by modifying CMakeLists.txt, but I guess CMAKE_SYSTEM_NAME MATCHES "Darwin" piece will also remove it for proper Mac OS builds, not something you will like:

Also, lighttpd supports multiple build systems besides CMake, and changes should generally be applied consistently.

This is what I did:

https://git.lighttpd.net/lighttpd/lighttpd1.4/commit/661905adf42f6133eb70bd197a8debce04d8a250

Tested, works as intended for me :)