[chrony-dev] [PATCH] sys_linux: Fix build failure on ARM Cortex-A9

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-dev Archives ]


Guard references to syscalls not available on 32-bit ARM EABI
(__ARM_EABI__).

Signed-off-by: James Raphael Tiovalen <jamestiotio@xxxxxxxxx>
---
 sys_linux.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/sys_linux.c b/sys_linux.c
index 6849637..ce91dc9 100644
--- a/sys_linux.c
+++ b/sys_linux.c
@@ -485,7 +485,9 @@ SYS_Linux_EnableSystemCallFilter(int level, SYS_ProcessContext context)
 #endif
     SCMP_SYS(gettimeofday),
     SCMP_SYS(settimeofday),
+#ifdef __NR_time
     SCMP_SYS(time),
+#endif
 
     /* Process */
     SCMP_SYS(clone),
@@ -495,7 +497,9 @@ SYS_Linux_EnableSystemCallFilter(int level, SYS_ProcessContext context)
     SCMP_SYS(exit),
     SCMP_SYS(exit_group),
     SCMP_SYS(getpid),
+#ifdef __NR_getrlimit
     SCMP_SYS(getrlimit),
+#endif
     SCMP_SYS(getuid),
     SCMP_SYS(getuid32),
 #ifdef __NR_membarrier
@@ -510,12 +514,16 @@ SYS_Linux_EnableSystemCallFilter(int level, SYS_ProcessContext context)
     SCMP_SYS(set_tid_address),
     SCMP_SYS(sigreturn),
     SCMP_SYS(wait4),
+#ifdef __NR_waitpid
     SCMP_SYS(waitpid),
+#endif
 
     /* Memory */
     SCMP_SYS(brk),
     SCMP_SYS(madvise),
+#ifdef __NR_mmap
     SCMP_SYS(mmap),
+#endif
     SCMP_SYS(mmap2),
     SCMP_SYS(mprotect),
     SCMP_SYS(mremap),
@@ -539,7 +547,9 @@ SYS_Linux_EnableSystemCallFilter(int level, SYS_ProcessContext context)
     SCMP_SYS(lseek),
     SCMP_SYS(lstat),
     SCMP_SYS(lstat64),
+#ifdef __NR_newfstatat
     SCMP_SYS(newfstatat),
+#endif
     SCMP_SYS(readlink),
     SCMP_SYS(readlinkat),
     SCMP_SYS(rename),
@@ -576,7 +586,9 @@ SYS_Linux_EnableSystemCallFilter(int level, SYS_ProcessContext context)
     SCMP_SYS(sendto),
     SCMP_SYS(shutdown),
     /* TODO: check socketcall arguments */
+#ifdef __NR_socketcall
     SCMP_SYS(socketcall),
+#endif
 
     /* General I/O */
     SCMP_SYS(_newselect),
@@ -600,7 +612,9 @@ SYS_Linux_EnableSystemCallFilter(int level, SYS_ProcessContext context)
 #ifdef __NR_futex_time64
     SCMP_SYS(futex_time64),
 #endif
+#ifdef __NR_select
     SCMP_SYS(select),
+#endif
     SCMP_SYS(set_robust_list),
     SCMP_SYS(write),
     SCMP_SYS(writev),
-- 
2.42.0


-- 
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/