[Home]

Summary:ASTERISK-13890: inotify header file prevents Asterisk from compiling
Reporter:phsultan (phsultan)Labels:
Date Opened:2009-04-03 08:15:35Date Closed:2009-04-03 10:19:28
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/BuildSystem
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Here is the error I get :

  [CC] stdtime/localtime.c -> stdtime/localtime.o
stdtime/localtime.c: In function âadd_notifyâ:
stdtime/localtime.c:313: error: âIN_DONT_FOLLOWâ undeclared (first use in this function)
stdtime/localtime.c:313: error: (Each undeclared identifier is reported only once
stdtime/localtime.c:313: error: for each function it appears in.)
make[1]: *** [stdtime/localtime.o] Error 1
make: *** [main] Error 2

My /usr/include/sys/inotify.h file (included in stdtime/localtime.c and checked by the configure script) doesn't mention IN_DONT_FOLLOW. However, /usr/include/linux/inotify.h mentions it, and Asterisk compiles properly if I include the latter instead.

I suspected I had some packages improperly installed, but both files come from my glibc-devel package :
[root@media trunk-commit]# rpmquery -f /usr/include/sys/inotify.h
glibc-devel-2.4-7mdv2007.0
[root@media trunk-commit]# rpmquery -f /usr/include/linux/inotify.h
glibc-devel-2.4-7mdv2007.0
[root@media trunk-commit]#


****** ADDITIONAL INFORMATION ******

A simple workaround is to compile Asterisk without inotify :
[root@media trunk-commit]# ./configure --without-inotify
Comments:By: Mark Michelson (mmichelson) 2009-04-03 08:54:47

Interesting. You're using glibc 2.4, but the man page for inotify claims that IN_DONT_FOLLOW was added in glibc 2.5. This is probably why simply including sys/inotify.h is not working properly.

I'm assigning this to tilghman since he has the most experience working with inotify.

By: Digium Subversion (svnbot) 2009-04-03 10:18:29

Repository: asterisk
Revision: 186297

U   trunk/main/stdtime/localtime.c

------------------------------------------------------------------------
r186297 | tilghman | 2009-04-03 10:18:29 -0500 (Fri, 03 Apr 2009) | 4 lines

Compatibility fix for glibc 2.4
(Closes issue ASTERISK-13890)
Reported by: phsultan

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=186297

By: Digium Subversion (svnbot) 2009-04-03 10:19:27

Repository: asterisk
Revision: 186302

_U  branches/1.6.2/
U   branches/1.6.2/main/stdtime/localtime.c

------------------------------------------------------------------------
r186302 | tilghman | 2009-04-03 10:19:27 -0500 (Fri, 03 Apr 2009) | 11 lines

Merged revisions 186297 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
 r186297 | tilghman | 2009-04-03 10:18:28 -0500 (Fri, 03 Apr 2009) | 4 lines
 
 Compatibility fix for glibc 2.4
 (Closes issue ASTERISK-13890)
 Reported by: phsultan
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=186302