Skip to content

Commit

Permalink
Fix include files for fork()
Browse files Browse the repository at this point in the history
  • Loading branch information
AMDmi3 authored and sezero committed Jul 19, 2022
1 parent 9ad5eb2 commit 755fd68
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -294,14 +294,14 @@ if(SDL2MIXER_CMD)
target_compile_definitions(SDL2_mixer PRIVATE MUSIC_CMD)
set(fork_found OFF)
if(NOT fork_found)
check_symbol_exists(fork sys/unistd.h HAVE_FORK)
check_symbol_exists(fork unistd.h HAVE_FORK)
if(HAVE_FORK)
set(fork_found ON)
target_compile_definitions(SDL2_mixer PRIVATE HAVE_FORK)
endif()
endif()
if(NOT fork_found)
check_symbol_exists(fork sys/unistd.h HAVE_VFORK)
check_symbol_exists(fork unistd.h HAVE_VFORK)

This comment has been minimized.

Copy link
@Wohlstand

Wohlstand Jul 19, 2022

Contributor

This line intended to find vfork, but you actually check for the fork again 👀

This comment has been minimized.

Copy link
@Wohlstand

Wohlstand Jul 19, 2022

Contributor

I think, it's good to put the:

check_symbol_exists(vfork unistd.h HAVE_VFORK)

This comment has been minimized.

Copy link
@sezero

sezero Jul 19, 2022

Contributor

Fixed in 2385a50

if(HAVE_VFORK)
set(fork_found ON)
target_compile_definitions(SDL2_mixer PRIVATE HAVE_VFORK)
Expand Down

0 comments on commit 755fd68

Please sign in to comment.