samba includes <sys/capability.h> somewhere before <linux/inotify.h>. because capability.h defines _LINUX_TYPES_H <linux/types.h> never gets included and __s32, needed for inotify_event struct is not defined. Reproducible: Always Steps to Reproduce: 1. emerge sys-libs/libcap-2.06-r1 2. emerge net-fs/samba-3.0.28 or test.c: --start #include <sys/capability.h> #include <linux/inotify.h> --end Actual Results: In file included from smbd/notify_inotify.c:33: /usr/include/linux/inotify.h:19: error: expected specifier-qualifier-list before ‘__s32’ smbd/notify_inotify.c: In function ‘filter_match’: smbd/notify_inotify.c:102: error: ‘struct inotify_event’ has no member named ‘mask’ smbd/notify_inotify.c:105: error: ‘struct inotify_event’ has no member named ‘mask’ smbd/notify_inotify.c:112: error: ‘struct inotify_event’ has no member named ‘mask’ smbd/notify_inotify.c:117: error: ‘struct inotify_event’ has no member named ‘mask’ smbd/notify_inotify.c:125: error: ‘struct inotify_event’ has no member named ‘mask’ smbd/notify_inotify.c: In function ‘inotify_dispatch’: smbd/notify_inotify.c:152: error: ‘struct inotify_event’ has no member named ‘mask’ smbd/notify_inotify.c:152: error: ‘struct inotify_event’ has no member named ‘len’ smbd/notify_inotify.c:152: error: ‘struct inotify_event’ has no member named ‘name’ smbd/notify_inotify.c:156: error: ‘struct inotify_event’ has no member named ‘mask’ smbd/notify_inotify.c:163: error: ‘struct inotify_event’ has no member named ‘mask’ smbd/notify_inotify.c:165: error: ‘struct inotify_event’ has no member named ‘mask’ smbd/notify_inotify.c:167: error: ‘struct inotify_event’ has no member named ‘mask’ smbd/notify_inotify.c:168: error: ‘struct inotify_event’ has no member named ‘cookie’ smbd/notify_inotify.c:168: error: ‘struct inotify_event’ has no member named ‘cookie’ smbd/notify_inotify.c:173: error: ‘struct inotify_event’ has no member named ‘mask’ smbd/notify_inotify.c:174: error: ‘struct inotify_event’ has no member named ‘cookie’ smbd/notify_inotify.c:182: error: ‘struct inotify_event’ has no member named ‘name’ smbd/notify_inotify.c:190: error: ‘struct inotify_event’ has no member named ‘wd’ smbd/notify_inotify.c:199: error: ‘struct inotify_event’ has no member named ‘mask’ smbd/notify_inotify.c:204: error: ‘struct inotify_event’ has no member named ‘mask’ smbd/notify_inotify.c:208: error: ‘struct inotify_event’ has no member named ‘wd’ smbd/notify_inotify.c: In function ‘inotify_handler’: smbd/notify_inotify.c:250: error: ‘struct inotify_event’ has no member named ‘len’ smbd/notify_inotify.c:252: error: ‘struct inotify_event’ has no member named ‘len’ smbd/notify_inotify.c:255: error: ‘struct inotify_event’ has no member named ‘cookie’ The following command failed: x86_64-pc-linux-gnu-gcc -I. -I/var/tmp/portage/net-fs/samba-3.0.28/work/samba-3.0.28/source -mtune=k8 -march=k8 -O2 -fomit-frame-pointer -frename-registers -fweb -fgcse -fgcse-sm -fgcse-las -fgcse-after-reload -ftree-vectorize -g -pipe -D_SAMBA_BUILD_=3 -I/var/tmp/portage/net-fs/samba-3.0.28/work/samba-3.0.28/source/iniparser/src -Iinclude -I./include -I. -I. -I./lib/replace -I./lib/talloc -I./tdb/include -I./libaddns -I./librpc -DHAVE_CONFIG_H -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -DLDAP_DEPRECATED -I/var/tmp/portage/net-fs/samba-3.0.28/work/samba-3.0.28/source/lib -D_SAMBA_BUILD_=3 -fPIC -c smbd/notify_inotify.c -o smbd/notify_inotify.o
*** This bug has been marked as a duplicate of bug 210527 ***
That's right. This isn't a duplicate. Samba's inotify_* glibc is broken, upstream bug: https://bugzilla.samba.org/show_bug.cgi?id=5271 It should not include a kernel header but the corresponding glibc-header if possible.
Fixed in CVS. Please wait a couple of hours, resync and retry. Thanks.