lkml.org 
[lkml]   [2017]   [Sep]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subjectseccomp selftest fails to build with glibc 2.26
Hi Kees,

I'm seeing build failures with your seccomp selftest when using glibc
2.26. The first are related to changing macro names from __have_sig*_t
to __sig*_t_defined. But after defining those there are more conflicting
definitions. I was able to get it to build with the changes below,
however it's ugly so I'm hesitant to suggest that it's a fix (and I
haven't tested with older glibc either).

The full build output is a little lengthy, so I've pasted it at
http://pastebin.ubuntu.com/25486192/ rather than including it inline.

Thanks,
Seth


diff --git a/tools/testing/selftests/seccomp/seccomp_bpf.c b/tools/testing/selftests/seccomp/seccomp_bpf.c
index 03f1fa49..d234a3e5 100644
--- a/tools/testing/selftests/seccomp/seccomp_bpf.c
+++ b/tools/testing/selftests/seccomp/seccomp_bpf.c
@@ -11,6 +11,13 @@
#define __have_sigval_t 1
#define __have_sigevent_t 1

+/* These fix errors with glibc 2.26 */
+#define __siginfo_t_defined 1
+#define __sigval_t_defined 1
+#define __sigevent_t_defined 1
+#define _BITS_SIGINFO_CONSTS_H 1
+#define _BITS_SIGEVENT_CONSTS_H 1
+
#include <errno.h>
#include <linux/filter.h>
#include <sys/prctl.h>
\
 
 \ /
  Last update: 2017-09-07 23:28    [W:0.036 / U:0.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site