[chrony-dev] [PATCH] sys_linux: fix build with older kernel headers

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


The renameat2 system call was introduced in kernel version 3.15. Fix
build against older headers.
---
 sys_linux.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys_linux.c b/sys_linux.c
index 0b24445e173d..202da845edac 100644
--- a/sys_linux.c
+++ b/sys_linux.c
@@ -547,7 +547,9 @@ SYS_Linux_EnableSystemCallFilter(int level, SYS_ProcessContext context)
     SCMP_SYS(readlinkat),
     SCMP_SYS(rename),
     SCMP_SYS(renameat),
+#ifdef __NR_renameat2
     SCMP_SYS(renameat2),
+#endif
     SCMP_SYS(stat),
     SCMP_SYS(stat64),
     SCMP_SYS(statfs),
-- 
2.29.2


-- 
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/