<html>
    <head>
      <base href="https://bugs.webkit.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - pthread_t not properly detected"
   href="https://bugs.webkit.org/show_bug.cgi?id=170169">170169</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>pthread_t not properly detected
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>WebKit Local Build
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Major
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Tools / Tests
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>ajacoutot&#64;gnome.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>lforschler&#64;apple.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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 '&lt;pthread.h&gt;'.

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:&quot;/usr/local/bin/ninja&quot; &quot;cmTC_05d43&quot;
[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)) &amp;&amp; !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 &lt;pthread.h.h&gt;
     #endif])

Thanks.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>