File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -114,8 +114,8 @@ set(PHP_EXT_OPCACHE_HAS_SHM_MMAP_POSIX_EXITCODE 0)
114114# ext/pcntl
115115################################################################################
116116
117- # Set the exit code of the sched_getcpu check.
118- set (HAVE_SCHED_GETCPU_EXITCODE 0)
117+ # Set the exit code of the sched_getcpu() check.
118+ set (PHP_EXT_PCNTL_HAS_SCHED_GETCPU_EXITCODE 0)
119119
120120################################################################################
121121# ext/pcre
Original file line number Diff line number Diff line change @@ -171,17 +171,17 @@ cmake_push_check_state(RESET)
171171 set (CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE)
172172
173173 # Check if sched_getcpu() is supported. Value -1 means ENOSYS in this context.
174- block()
174+ block(PROPAGATE HAVE_SCHED_GETCPU )
175175 php_search_libraries(
176176 sched_getcpu
177177 HEADERS sched.h
178178 LIBRARIES
179179 gnu # Haiku
180- VARIABLE PHP_EXT_PCNTL_HAS_SCHED_GETCPU
180+ VARIABLE PHP_EXT_PCNTL_HAS_SCHED_GETCPU_SYMBOL
181181 LIBRARY_VARIABLE library
182182 )
183183
184- if (PHP_EXT_PCNTL_HAS_SCHED_GETCPU )
184+ if (PHP_EXT_PCNTL_HAS_SCHED_GETCPU_SYMBOL )
185185 if (library)
186186 set (CMAKE_REQUIRED_LIBRARIES ${library} )
187187 endif ()
@@ -194,11 +194,15 @@ cmake_push_check_state(RESET)
194194 }
195195 return 0;
196196 }
197- ]] HAVE_SCHED_GETCPU )
197+ ]] PHP_EXT_PCNTL_HAS_SCHED_GETCPU )
198198 endif ()
199199
200- if (HAVE_SCHED_GETCPU AND library)
201- target_link_libraries (php_ext_pcntl PRIVATE ${library} )
200+ if (PHP_EXT_PCNTL_HAS_SCHED_GETCPU)
201+ if (library)
202+ target_link_libraries (php_ext_pcntl PRIVATE ${library} )
203+ endif ()
204+
205+ set (HAVE_SCHED_GETCPU TRUE )
202206 endif ()
203207 endblock()
204208cmake_pop_check_state()
You can’t perform that action at this time.
0 commit comments