Bug 5271 - Broken glibc inotify_* detection
Summary: Broken glibc inotify_* detection
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: Build environment (show other bugs)
Version: 3.0.28
Hardware: Other Linux
: P3 normal
Target Milestone: none
Assignee: Tim Potter
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-19 10:37 UTC by Tiziano Müller
Modified: 2008-02-25 05:55 UTC (History)
0 users

See Also:


Attachments
3.0.28-inotify_include.patch (1.63 KB, patch)
2008-02-19 12:11 UTC, Tiziano Müller
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tiziano Müller 2008-02-19 10:37:11 UTC
In configure.in, the following line:
AC_CHECK_FUNC(inotify_init)
should be replaced by
AC_CHECK_FUNCS(inotify_init)
which then actually defines the symbol HAVE_INOTIFY_INIT which is being used in smbd/notify_inotify.c

Furthermore, I guess that
*snip*
#include <linux/inotify.h>
#include <asm/unistd.h>
*snip*
in smbd/notify_inotify.c should be moved in the "#ifndef HAVE_INOTIFY_INIT" conditional to avoid incompatible redefinition (the inotify_* functions are defined non-static in glibc-2.7).

Using <linux/inotify.h> with kernel-2.6.24 headers leads to such errors (in combination with a newer libcap-2.x):

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’
[...]
Comment 1 Tiziano Müller 2008-02-19 10:51:09 UTC
... and add a line
#undef HAVE_INOTIFY_INIT
to include/config.h of course :)
Comment 2 Tiziano Müller 2008-02-19 12:11:57 UTC
Created attachment 3142 [details]
3.0.28-inotify_include.patch

The patch which does all the mentioned things :-)
Comment 3 Volker Lendecke 2008-02-25 05:55:58 UTC
Pushed to 3.0 and 3.2, thanks.

Volker