]> git.proxmox.com Git - mirror_lxc.git/commit
lxc/tools/lxc_monitor: include missing <stddef.h>
authorThomas Petazzoni <thomas.petazzoni@bootlin.com>
Fri, 20 Apr 2018 10:26:33 +0000 (12:26 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Fri, 20 Apr 2018 10:26:33 +0000 (12:26 +0200)
commit77d407537f57c3fb92787bdda1eeaec7941d344f
tree7a8fef9a2ca555358d98b160964ef0e0dae46ffa
parent7d675310aed7de830363f1ae00e4d17142139727
lxc/tools/lxc_monitor: include missing <stddef.h>

lxc_monitor.c uses offsetof(), so it should include
<stddef.h>. Otherwise the build fails with the musl C library:

tools/lxc_monitor.c: In function ‘lxc_abstract_unix_connect’:
tools/lxc_monitor.c:324:9: warning: implicit declaration of function ‘offsetof’ [-Wimplicit-function-declaration]
         offsetof(struct sockaddr_un, sun_path) + len + 1);
         ^~~~~~~~
tools/lxc_monitor.c:324:18: error: expected expression before ‘struct’
         offsetof(struct sockaddr_un, sun_path) + len + 1);
                  ^~~~~~

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
src/lxc/tools/lxc_monitor.c