ipc: enable _GNU_SOURCE to fix build with musl libc
[collectd.git] / src / ipc.c
index 3763f24..b403847 100644 (file)
--- a/src/ipc.c
+++ b/src/ipc.c
@@ -32,6 +32,9 @@
 #include "configfile.h"
 
 #if KERNEL_LINUX
+  /* _GNU_SOURCE is needed for struct shm_info.used_ids on musl libc */
+# define _GNU_SOURCE
+
   /* X/OPEN tells us to use <sys/{types,ipc,sem}.h> for semctl() */
   /* X/OPEN tells us to use <sys/{types,ipc,msg}.h> for msgctl() */
   /* X/OPEN tells us to use <sys/{types,ipc,shm}.h> for shmctl() */