Bug 1207790 - Fix sandbox build for older Linux distributions. r=gdestuynder, a=sylvestre
authorJed Davis <jld@mozilla.com>
Fri, 30 Oct 2015 15:13:00 +0100
changeset 296658 89e3c373b3a4
parent 296657 90cae878a97e
child 296659 be9dcc3b97b3
push id5276
push usercbook@mozilla.com
push date2015-11-09 10:31 +0000
treeherdermozilla-beta@be9dcc3b97b3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgdestuynder, sylvestre
bugs1207790
milestone43.0
Bug 1207790 - Fix sandbox build for older Linux distributions. r=gdestuynder, a=sylvestre
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 {