[PATCH] D119695: [Support] Fix build on illumos

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 15 00:44:10 PST 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG8f55cd0178c1: [Support] Fix build on illumos (authored by nikic).

Repository:
  rG LLVM Github Monorepo

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.408739.patch
Type: text/x-patch
Size: 544 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220215/cc9a6d78/attachment.bin>


More information about the llvm-commits mailing list