hi, the current code has changed include linux/inotify.h to sys/inotify.h since 2006-01-17, but that won't work with inotify*.h as documented in the wiki. One has to either revert back to linux/inotify.h, or add #include <sys/inotify-syscalls.h> to both configure.in and src/lib/ioloop-notify-inotify.c Or, just symlink sys/inotify.h -> linux/inotify.h. That's on Debian 3.1 (Sarge). -- paolo GPG/PGP id:0x1D5A11A4 - 04FC 8EB9 51A1 5158 1425 BC12 EA57 3382 1D5A 11A4
Timo Sirainen
2007-Nov-02 16:07 UTC
[Dovecot] *notify config for 1.0.x doesn't enable inotify
On Fri, 2007-11-02 at 14:56 +0100, Paolo wrote:> the current code has changed include linux/inotify.h to sys/inotify.h since > 2006-01-17, but that won't work with inotify*.h as documented in the wiki.The wiki entry seems to create /usr/local/include/sys/inotify.h and it should be possible to include that as <sys/inotify.h>. Maybe the real problem is that if you tried that, the /usr/local/include isn't in the standard include lookup paths. So you should do: CPPFLAGS='-I /usr/local/include' ./configure --with-notify=inotify -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20071102/6612fe81/attachment-0002.bin>
On Fri, Nov 02, 2007 at 06:07:35PM +0200, Timo Sirainen wrote:> On Fri, 2007-11-02 at 14:56 +0100, Paolo wrote: > > the current code has changed include linux/inotify.h to sys/inotify.h since > > 2006-01-17, but that won't work with inotify*.h as documented in the wiki. > > The wiki entry seems to create /usr/local/include/sys/inotify.h and it > should be possible to include that as <sys/inotify.h>. Maybe the real > problem is that if you tried that, the /usr/local/include isn't in the > standard include lookup paths. So you should do: > > CPPFLAGS='-I /usr/local/include' ./configure --with-notify=inotify >indeed, I spent a while to convince the autoconf to look that up, but then I realized the problem isn't the path, the test program always fails, simply because the new defs have been splitted in the 2 files mentioned in the wiki, the problem being that inotify.h doesn't #include inotify-syscalls.h on its own, and compile fails for undefined functions, eg inotify_add_watch(), which instead are defined in the single linux/inotify.h. Perhaps such "#include <sys/inotify-syscalls.h>" should be in inotify.h, but I think those .h are older versions, since current in-kernel inotify.h is just that, all in one. -- paolo GPG/PGP id:0x1D5A11A4 - 04FC 8EB9 51A1 5158 1425 BC12 EA57 3382 1D5A 11A4