aboutsummaryrefslogtreecommitdiffstats
path: root/src/fseccomp
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2017-05-12 10:37:57 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2017-05-12 10:37:57 -0400
commit59e17f93bcd35d43710fa470121c66036eb7a0f3 (patch)
tree50bcd212847815e47bfbed669363ab8c57692770 /src/fseccomp
parenterror message fix (diff)
downloadfirejail-59e17f93bcd35d43710fa470121c66036eb7a0f3.tar.gz
firejail-59e17f93bcd35d43710fa470121c66036eb7a0f3.tar.zst
firejail-59e17f93bcd35d43710fa470121c66036eb7a0f3.zip
compile fixes on 32bit platforms
Diffstat (limited to 'src/fseccomp')
-rw-r--r--src/fseccomp/protocol.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/fseccomp/protocol.c b/src/fseccomp/protocol.c
index 57ce2f8e0..4a0fadb3c 100644
--- a/src/fseccomp/protocol.c
+++ b/src/fseccomp/protocol.c
@@ -60,6 +60,7 @@ static char *protocol[] = {
60 NULL 60 NULL
61}; 61};
62 62
63#ifdef SYS_socket
63static struct sock_filter protocol_filter_command[] = { 64static struct sock_filter protocol_filter_command[] = {
64 WHITELIST(AF_UNIX), 65 WHITELIST(AF_UNIX),
65 WHITELIST(AF_INET), 66 WHITELIST(AF_INET),
@@ -67,6 +68,7 @@ static struct sock_filter protocol_filter_command[] = {
67 WHITELIST(AF_NETLINK), 68 WHITELIST(AF_NETLINK),
68 WHITELIST(AF_PACKET) 69 WHITELIST(AF_PACKET)
69}; 70};
71#endif
70// Note: protocol[] and protocol_filter_command are synchronized 72// Note: protocol[] and protocol_filter_command are synchronized
71 73
72// command length 74// command length
@@ -75,6 +77,7 @@ struct sock_filter whitelist[] = {
75}; 77};
76unsigned whitelist_len = sizeof(whitelist) / sizeof(struct sock_filter); 78unsigned whitelist_len = sizeof(whitelist) / sizeof(struct sock_filter);
77 79
80#ifdef SYS_socket
78static struct sock_filter *find_protocol_domain(const char *p) { 81static struct sock_filter *find_protocol_domain(const char *p) {
79 int i = 0; 82 int i = 0;
80 while (protocol[i] != NULL) { 83 while (protocol[i] != NULL) {
@@ -85,7 +88,7 @@ static struct sock_filter *find_protocol_domain(const char *p) {
85 88
86 return NULL; 89 return NULL;
87} 90}
88 91#endif
89 92
90void protocol_print(void) { 93void protocol_print(void) {
91#ifndef SYS_socket 94#ifndef SYS_socket