WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
170169
pthread_t not properly detected
https://bugs.webkit.org/show_bug.cgi?id=170169
Summary
pthread_t not properly detected
Antoine Jacoutot
Reported
2017-03-28 00:39:17 PDT
Hi. WebKit checks for the pthread_np include file using: _HAVE_CHECK_INCLUDE(HAVE_PTHREAD_NP_H pthread_np.h) However, on at least OpenBSD this will always fail because this file is not usable by itself. It is usually used in conjunction with '<pthread.h>'. Determining if the include file pthread_np.h exists failed with the following output: Change Dir: /hack/objdirs/pobj/webkitgtk4-2.16.0/build-amd64/CMakeFiles/CMakeTmp Run Build Command:"/usr/local/bin/ninja" "cmTC_05d43" [1/2] Building C object CMakeFiles/cmTC_05d43.dir/CheckIncludeFile.c.o FAILED: CMakeFiles/cmTC_05d43.dir/CheckIncludeFile.c.o /hack/objdirs/pobj/webkitgtk4-2.16.0/bin/cc -O2 -pipe -I/usr/X11R6/include -fno-exceptions -fno-strict-aliasing -o CMakeFiles/cmTC_05d43.dir/CheckIncludeFile.c.o -c /hack/objdirs/pobj/webk itgtk4-2.16.0/build-amd64/CMakeFiles/CMakeTmp/CheckIncludeFile.c In file included from /hack/objdirs/pobj/webkitgtk4-2.16.0/build-amd64/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:0: /usr/include/pthread_np.h:46:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int' int pthread_mutexattr_getkind_np(pthread_mutexattr_t); ^ /usr/include/pthread_np.h:47:34: error: unknown type name 'pthread_mutexattr_t' int pthread_hmutexattr_setkind_np(pthread_mutexattr_t *, int); ^ /usr/include/pthread_np.h:48:37: error: expected ')' before 'const' void pthread_set_name_np(pthread_t, const char *); ^ /usr/include/pthread_np.h:49:44: error: expected ')' before '*' token int pthread_stackseg_np(pthread_t, stack_t *); ^ /hack/objdirs/pobj/webkitgtk4-2.16.0/build-amd64/CMakeFiles/CMakeTmp/CheckIncludeFile.c:9:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int' int main(void) ^ ninja: build stopped: subcommand failed. Previous versions did not have this issue because it was explicitely declared under Source/WTF/wtf/Platform.h: #if (OS(FREEBSD) || OS(OPENBSD)) && !defined(__GLIBC__) #define HAVE_PTHREAD_NP_H 1 #endif I am not sure how (or even if) it is possible to add a dependent include to _HAVE_CHECK_INCLUDE. Using autoconf, I'd do something like: AC_CHECK_HEADERS([pthread_np.h],,, [#ifdef HAVE_PTHREAD_H #include <pthread.h.h> #endif]) Thanks.
Attachments
Add attachment
proposed patch, testcase, etc.
Antoine Jacoutot
Comment 1
2019-09-22 05:33:36 PDT
Cannot reproduce.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug