From: Natanael Copa Date: Wed, 5 Aug 2015 06:48:08 +0000 (+0200) Subject: ipc: enable _GNU_SOURCE to fix build with musl libc X-Git-Tag: collectd-5.5.1~69 X-Git-Url: https://git.octo.it/?p=collectd.git;a=commitdiff_plain;h=3e3848349b753d78a0b1d19648fb394866856bda ipc: enable _GNU_SOURCE to fix build with musl libc This fixes compile the compile error: > ipc.c:154:49: error: 'struct shm_info' has no member named 'used_ids' > ipc_submit_g("shm", "segments", NULL, shm_info.used_ids); > ^ Fixes #1147 --- diff --git a/src/ipc.c b/src/ipc.c index 3763f248..b4038472 100644 --- 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 for semctl() */ /* X/OPEN tells us to use for msgctl() */ /* X/OPEN tells us to use for shmctl() */