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 270849 5cbef5458e6b5a0eaf47718003222d2b4dc5d4e4
parent 270848 b531b32383d447c667f6d0687f3cc28f63595ebd
child 270850 e86590c03dc5225c615cc5f8fb4757d93cbf1051
push id86
push usercbook@mozilla.com
push dateWed, 04 Nov 2015 14:00:24 +0000
reviewersgdestuynder
bugs1207790
milestone45.0a1
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 {