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 @@ -177,17 +177,17 @@ cmake_push_check_state(RESET)
177177 set (CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE)
178178
179179 # Check if sched_getcpu() is supported. Value -1 means ENOSYS in this context.
180- block()
180+ block(PROPAGATE HAVE_SCHED_GETCPU )
181181 php_search_libraries(
182182 sched_getcpu
183183 HEADERS sched.h
184184 LIBRARIES
185185 gnu # Haiku
186- VARIABLE PHP_EXT_PCNTL_HAS_SCHED_GETCPU
186+ VARIABLE PHP_EXT_PCNTL_HAS_SCHED_GETCPU_SYMBOL
187187 LIBRARY_VARIABLE library
188188 )
189189
190- if (PHP_EXT_PCNTL_HAS_SCHED_GETCPU )
190+ if (PHP_EXT_PCNTL_HAS_SCHED_GETCPU_SYMBOL )
191191 if (library)
192192 set (CMAKE_REQUIRED_LIBRARIES ${library} )
193193 endif ()
@@ -200,11 +200,15 @@ cmake_push_check_state(RESET)
200200 }
201201 return 0;
202202 }
203- ]] HAVE_SCHED_GETCPU )
203+ ]] PHP_EXT_PCNTL_HAS_SCHED_GETCPU )
204204 endif ()
205205
206- if (HAVE_SCHED_GETCPU AND library)
207- target_link_libraries (php_ext_pcntl PRIVATE ${library} )
206+ if (PHP_EXT_PCNTL_HAS_SCHED_GETCPU)
207+ if (library)
208+ target_link_libraries (php_ext_pcntl PRIVATE ${library} )
209+ endif ()
210+
211+ set (HAVE_SCHED_GETCPU TRUE )
208212 endif ()
209213 endblock()
210214cmake_pop_check_state()
You can’t perform that action at this time.
0 commit comments