19 lines
693 B
Diff
19 lines
693 B
Diff
--- a/security/sandbox/linux/SandboxFilter.cpp
|
|
+++ b/security/sandbox/linux/SandboxFilter.cpp
|
|
@@ -77,10 +77,12 @@ using namespace sandbox::bpf_dsl;
|
|
|
|
// The GNU libc headers define O_LARGEFILE as 0 on x86_64, but we need the
|
|
// actual value because it shows up in file flags.
|
|
-#if !defined(O_LARGEFILE) || O_LARGEFILE == 0
|
|
-# define O_LARGEFILE_REAL 00100000
|
|
+#if defined(__x86_64__) || defined(__i386__) || defined(__mips__)
|
|
+#define O_LARGEFILE_REAL 0100000
|
|
+#elif defined(__powerpc__)
|
|
+#define O_LARGEFILE_REAL 0200000
|
|
#else
|
|
-# define O_LARGEFILE_REAL O_LARGEFILE
|
|
+#define O_LARGEFILE_REAL O_LARGEFILE
|
|
#endif
|
|
|
|
// Not part of UAPI, but userspace sees it in F_GETFL; see bug 1650751.
|