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

Rainer Orth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 14 02:14:43 PST 2022


ro accepted this revision.
ro added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: llvm/lib/Support/Unix/Path.inc:123
+// 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);
----------------
Illumos might also consider following what Solaris 11.4 did in `<sys/mman.h>`:
```#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
#if !defined(__USE_LEGACY_PROTOTYPES__)
[...]
extern int madvise(void *, size_t, int);
#else
[...]
extern int madvise(caddr_t, size_t, int);
#endif
```
or something to that effect.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119695/new/

https://reviews.llvm.org/D119695



More information about the llvm-commits mailing list