--- a/include/tracefs.h
+++ b/include/tracefs.h
@@ -10,6 +10,14 @@
 #include <sched.h>
 #include <event-parse.h>
 
+#ifndef _GNU_SOURCE
+#if !__GLIBC__
+/* See CPU_SET(3) */
+struct cpu_set_t;
+typedef struct cpu_set_t cpu_set_t;
+#endif
+#endif
+
 char *tracefs_get_tracing_file(const char *name);
 void tracefs_put_tracing_file(char *name);
 
