[COMMITTED] libsanitizer: Fix Solaris 11.3 compilation of sanitizer_procmaps_solaris.cpp [PR105531]

Message ID yddy1txazmv.fsf@CeBiTec.Uni-Bielefeld.DE
State Accepted, archived
Headers
Series [COMMITTED] libsanitizer: Fix Solaris 11.3 compilation of sanitizer_procmaps_solaris.cpp [PR105531] |

Checks

Context Check Description
snail/gcc-patch-check success Github commit url

Commit Message

Rainer Orth Oct. 3, 2022, 11:57 a.m. UTC
  The latest libsanitizer import broke Solaris 11.3 bootstrap again, due
to an oversight of mine.  A fix has been committed upstream

	https://reviews.llvm.org/D133556

This patch cherry-picks it.  Tested on Solaris 11.3 and 11.4, SPARC and
x86.

Approved by Martin in the PR, committed to trunk.

	Rainer
  

Patch

# HG changeset patch
# Parent  5b7d5c364ecfeb253a886a59046e4bd6bd339c1e
Fix sanitizer_procmaps_solaris.cpp compilation on Solaris 11.3

diff --git a/libsanitizer/sanitizer_common/sanitizer_procmaps_solaris.cpp b/libsanitizer/sanitizer_common/sanitizer_procmaps_solaris.cpp
--- a/libsanitizer/sanitizer_common/sanitizer_procmaps_solaris.cpp
+++ b/libsanitizer/sanitizer_common/sanitizer_procmaps_solaris.cpp
@@ -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>