diff options
author | Fabrice Fontaine <fontaine.fabrice@gmail.com> | 2022-06-16 14:28:53 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2022-06-16 14:29:34 -0700 |
commit | 53a90f079af7ab491530d432bb318a95371ba877 (patch) | |
tree | c17215b0bf770868ba70157c370cd246ded37ba1 /absl/base/internal/direct_mmap.h | |
parent | c3c49150cc9711371c4402ceaa6143e4cc91d9a8 (diff) |
PR #1197: absl/base/internal/direct_mmap.h: fix musl build on mips
Imported from GitHub PR https://github.com/abseil/abseil-cpp/pull/1197
Fix the following musl build failure on mips:
```
In file included from /nvmedata/autobuild/instance-15/output-1/build/libabseil-cpp-20211102.0/absl/base/internal/low_level_alloc.cc:26:
/nvmedata/autobuild/instance-15/output-1/build/libabseil-cpp-20211102.0/absl/base/internal/direct_mmap.h:49:10: fatal error: sgidefs.h: No such file or directory
49 | #include <sgidefs.h>
| ^~~~~~~~~~~
```
Fixes:
- http://autobuild.buildroot.org/results/3fa027e602bacb22316fb5d9b233baa0b0f0e845
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Merge c9b5b5c5471213a871f7d6d1d2fc8f6899effbac into a184bab83ffcffc2aaac49a3900361158ab3890f
Merging this change closes #1197
COPYBARA_INTEGRATE_REVIEW=https://github.com/abseil/abseil-cpp/pull/1197 from ffontaine:master c9b5b5c5471213a871f7d6d1d2fc8f6899effbac
PiperOrigin-RevId: 455467767
Change-Id: I1905f7d70e914288bc1524a52adce3476a779fd8
Diffstat (limited to 'absl/base/internal/direct_mmap.h')
-rw-r--r-- | absl/base/internal/direct_mmap.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/absl/base/internal/direct_mmap.h b/absl/base/internal/direct_mmap.h index a01d6122..e492bb00 100644 --- a/absl/base/internal/direct_mmap.h +++ b/absl/base/internal/direct_mmap.h @@ -41,13 +41,13 @@ #ifdef __mips__ // Include definitions of the ABI currently in use. -#ifdef __BIONIC__ +#if defined(__BIONIC__) || !defined(__GLIBC__) // Android doesn't have sgidefs.h, but does have asm/sgidefs.h, which has the // definitions we need. #include <asm/sgidefs.h> #else #include <sgidefs.h> -#endif // __BIONIC__ +#endif // __BIONIC__ || !__GLIBC__ #endif // __mips__ // SYS_mmap and SYS_munmap are not defined in Android. |