]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Compatibility fix for glibc 2.4
authorTilghman Lesher <tilghman@meg.abyt.es>
Fri, 3 Apr 2009 15:18:28 +0000 (15:18 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Fri, 3 Apr 2009 15:18:28 +0000 (15:18 +0000)
(Closes issue #14820)
Reported by: phsultan

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@186297 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/stdtime/localtime.c

index 10bc1eff6706e2b47ee2bd182343910c4c41ab0e..59bccf7a069a57736f08f26c259a22ed9b444489 100644 (file)
@@ -310,7 +310,11 @@ static void add_notify(struct state *sp, const char *path)
                        sp->wd[1] = -1;
                }
                /* or if the symlink itself changes (or the real file is here, if path is not a symlink) */
-               sp->wd[0] = inotify_add_watch(inotify_fd, path, IN_ATTRIB | IN_DELETE_SELF | IN_MODIFY | IN_MOVE_SELF | IN_CLOSE_WRITE | IN_DONT_FOLLOW);
+               sp->wd[0] = inotify_add_watch(inotify_fd, path, IN_ATTRIB | IN_DELETE_SELF | IN_MODIFY | IN_MOVE_SELF | IN_CLOSE_WRITE
+#ifdef IN_DONT_FOLLOW   /* Only defined in glibc 2.5 and above */
+                       | IN_DONT_FOLLOW
+#endif
+               );
        }
 }
 #else