Skip to content

Commit

Permalink
ipc: enable _GNU_SOURCE to fix build with musl libc
Browse files Browse the repository at this point in the history
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 collectd#1147
  • Loading branch information
ncopa committed Aug 5, 2015
1 parent caf9ddf commit 5970b7a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ipc.c
Expand Up @@ -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() */
Expand Down

0 comments on commit 5970b7a

Please sign in to comment.