Bug 1207790 - Fix sandbox build for older Linux distributions. r=gdestuynder
authorJed Davis <jld@mozilla.com>
Fri, 30 Oct 2015 15:13:00 +0100
changeset 270766 5cbef5458e6b5a0eaf47718003222d2b4dc5d4e4
parent 270765 b531b32383d447c667f6d0687f3cc28f63595ebd
child 270767 e86590c03dc5225c615cc5f8fb4757d93cbf1051
push id29623
push userkwierso@gmail.com
push dateMon, 02 Nov 2015 23:12:59 +0000
treeherdermozilla-central@9f69202d8275 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgdestuynder
bugs1207790
milestone45.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1207790 - Fix sandbox build for older Linux distributions. r=gdestuynder
security/sandbox/linux/SandboxFilterUtil.cpp
--- a/security/sandbox/linux/SandboxFilterUtil.cpp
+++ b/security/sandbox/linux/SandboxFilterUtil.cpp
@@ -9,20 +9,25 @@
 #ifndef ANDROID
 #include <linux/ipc.h>
 #endif
 #include <linux/net.h>
 
 #include "mozilla/UniquePtr.h"
 #include "sandbox/linux/bpf_dsl/bpf_dsl.h"
 
+// Older kernel headers (mostly Android, but also some older desktop
+// distributions) are missing some or all of these:
 #ifndef SYS_ACCEPT4
-// Android's kernel headers don't define these.
 #define SYS_ACCEPT4  18
+#endif
+#ifndef SYS_RECVMMSG
 #define SYS_RECVMMSG 19
+#endif
+#ifndef SYS_SENDMMSG
 #define SYS_SENDMMSG 20
 #endif
 
 using namespace sandbox::bpf_dsl;
 #define CASES SANDBOX_BPF_DSL_CASES
 
 namespace mozilla {