[PATCH] D119695: [Support] Fix build on illumos
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 14 02:10:26 PST 2022
nikic updated this revision to Diff 408355.
nikic added a comment.
Check __svr4__ as well.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119695/new/
https://reviews.llvm.org/D119695
Files:
llvm/lib/Support/Unix/Path.inc
Index: llvm/lib/Support/Unix/Path.inc
===================================================================
--- llvm/lib/Support/Unix/Path.inc
+++ llvm/lib/Support/Unix/Path.inc
@@ -118,6 +118,12 @@
#define STATVFS_F_FLAG(vfs) (vfs).f_flags
#endif
+#if defined(__sun__) && defined(__svr4__)
+// The madvise() declaration on Illumos cannot be made visible if _XOPEN_SOURCE
+// is defined. This declaration is also compatible with Solaris 11.4.
+extern "C" int madvise(void *, size_t, int);
+#endif
+
using namespace llvm;
namespace llvm {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119695.408355.patch
Type: text/x-patch
Size: 544 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220214/d07cc43b/attachment.bin>
More information about the llvm-commits
mailing list