[libcxx-commits] [PATCH] D92057: [libc++] Do not include sysctl.h when building with musl libc
Pengxuan Zheng via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Nov 24 13:48:25 PST 2020
pzheng created this revision.
pzheng added reviewers: ldionne, bcain.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.
pzheng requested review of this revision.
The header file sysctl.h uses __BEGIN_DECLS/__END_DECLS which are not defined by musl.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D92057
Files:
libcxx/src/thread.cpp
Index: libcxx/src/thread.cpp
===================================================================
--- libcxx/src/thread.cpp
+++ libcxx/src/thread.cpp
@@ -23,7 +23,7 @@
# include <sys/param.h>
#endif
-#if __has_include(<sys/sysctl.h>)
+#if !defined(_LIBCPP_HAS_MUSL_LIBC) && __has_include(<sys/sysctl.h>)
# include <sys/sysctl.h>
#endif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92057.307443.patch
Type: text/x-patch
Size: 343 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20201124/b5b0fccf/attachment.bin>
More information about the libcxx-commits
mailing list