[all-commits] [llvm/llvm-project] 8f55cd: [Support] Fix build on illumos

Nikita Popov via All-commits all-commits at lists.llvm.org
Tue Feb 15 00:44:18 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8f55cd0178c192232929afae5d73c363167b26d8
      https://github.com/llvm/llvm-project/commit/8f55cd0178c192232929afae5d73c363167b26d8
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2022-02-15 (Tue, 15 Feb 2022)

  Changed paths:
    M llvm/lib/Support/Unix/Path.inc

  Log Message:
  -----------
  [Support] Fix build on illumos

D116366 added a call to madvise() in Path.inc. Unfortunately,
Illumos does not declare this function if _XOPEN_SOURCE is defined
(which it is by default) and we need to provide the declaration
manually. This is the same workaround used in sanitizers:
https://github.com/llvm/llvm-project/blob/ee423d93ead39e94c2970b3cc7ef6e6faa75d10b/compiler-rt/lib/sanitizer_common/sanitizer_solaris.cpp#L77-L85

Differential Revision: https://reviews.llvm.org/D119695




More information about the All-commits mailing list