[chrony-dev] Patches for s390/s390x and ppc64le support

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


I ran into a few problems compiling chrony on architectures other than x86 and x86_64 when including syscall filtering.  The attached patches allowed the builds to complete for s390/s390x and ppc64le.  If there's a way to submit patches that is preferred over email, please let me know.


Thanks,

Mark Post


--- chrony-2.3/sys_linux.c	2016-02-16 08:25:38.000000000 -0500
+++ chrony-2.3/sys_linux.c	2016-03-18 14:37:37.860400626 -0400
@@ -456,7 +456,9 @@
   const int syscalls[] = {
     /* Clock */
     SCMP_SYS(adjtimex), SCMP_SYS(gettimeofday), SCMP_SYS(settimeofday),
+#ifndef __s390x__
     SCMP_SYS(time),
+#endif
     /* Process */
     SCMP_SYS(clone), SCMP_SYS(exit), SCMP_SYS(exit_group), SCMP_SYS(getrlimit),
     SCMP_SYS(rt_sigaction), SCMP_SYS(rt_sigreturn), SCMP_SYS(rt_sigprocmask),
@@ -477,7 +479,10 @@
     SCMP_SYS(socketcall),
     /* General I/O */
     SCMP_SYS(_newselect), SCMP_SYS(close), SCMP_SYS(open), SCMP_SYS(pipe),
-    SCMP_SYS(poll), SCMP_SYS(read), SCMP_SYS(futex), SCMP_SYS(select),
+    SCMP_SYS(poll), SCMP_SYS(read), SCMP_SYS(futex), 
+#ifndef __s390__
+    SCMP_SYS(select),
+#endif
     SCMP_SYS(set_robust_list), SCMP_SYS(write),
     /* Miscellaneous */
     SCMP_SYS(uname),
--- chrony-2.3/sys_linux.c	2016-02-16 08:25:38.000000000 -0500
+++ chrony-2.3/sys_linux.c	2016-03-18 13:03:27.510166230 -0400
@@ -33,6 +33,10 @@
 
 #include <sys/utsname.h>
 
+#if defined(__powerpc64__)
+#  include <termios.h>
+#endif
+
 #if defined(HAVE_SCHED_SETSCHEDULER)
 #  include <sched.h>
 #endif


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