[PATCH] D54338: Fix threads build on GNU/Hurd

Samuel Thibault via Phabricator reviews at reviews.llvm.org
Fri Nov 9 11:25:12 PST 2018


sthibaul created this revision.
Herald added subscribers: libcxx-commits, ldionne, krytarowski.

GNU/Hurd uses BSD-based interfaces, but does not (and won't) provide <sys/sysctl.h>


Repository:
  rCXX libc++

https://reviews.llvm.org/D54338

Files:
  src/thread.cpp


Index: src/thread.cpp
===================================================================
--- src/thread.cpp
+++ src/thread.cpp
@@ -19,7 +19,7 @@
 
 #if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
 # include <sys/param.h>
-# if defined(BSD)
+# if defined(BSD) && !defined(__GNU__)
 #   include <sys/sysctl.h>
 # endif // defined(BSD)
 #endif // defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54338.173393.patch
Type: text/x-patch
Size: 427 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20181109/4abf67c4/attachment.bin>


More information about the libcxx-commits mailing list