Skip to content

Commit

Permalink
[sanitizer_common] Restore sanitizer_procmaps_solaris.cpp compilation…
Browse files Browse the repository at this point in the history
… on Solaris 11.3

When upstream `compiler-rt` was recently imported into GCC's
`libsanitizer`, Solaris 11.3 bootstrap broke because in 11.3
`<sys/procfs.h>` doesn't mix with largefile compilation.  I'd caused this
in D129837 <https://reviews.llvm.org/D129837> where I forgot that the code
still needs to support Solaris 11.3.

Fixed by restoring the `#undef _FILE_OFFSET_BITS`.

Tested on `sparc-sun-solaris2.11` and `amd64-pc-solaris2.11` (Solaris 11.4)
in LLVM and both Solaris 11.3 and 11.4 in GCC.

Differential Revision: https://reviews.llvm.org/D133556
  • Loading branch information
rorth committed Sep 23, 2022
1 parent c94cbc3 commit 1cd4d63
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -9,6 +9,8 @@
// Information about the process mappings (Solaris-specific parts).
//===----------------------------------------------------------------------===//

// Before Solaris 11.4, <procfs.h> doesn't work in a largefile environment.
#undef _FILE_OFFSET_BITS
#include "sanitizer_platform.h"
#if SANITIZER_SOLARIS
# include <fcntl.h>
Expand Down

0 comments on commit 1cd4d63

Please sign in to comment.