1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2025-01-27 09:08:25 +00:00

inotifi_init1() is not available on older systems

-> replace with inotify_init() + fcntl()
atomicity should not be important here, since we don't have any threads running at the point of
the call
This commit is contained in:
Pavel Labath 2010-04-12 22:40:16 +02:00
parent 02d97f9445
commit 13c973d1b5

View File

@ -5944,7 +5944,13 @@ int main(int argc, char **argv)
#endif /* XOAP */
#ifdef HAVE_SYS_INOTIFY_H
inotify_fd = inotify_init1(IN_NONBLOCK);
inotify_fd = inotify_init();
if(inotify_fd != -1) {
int fl;
fl = fcntl(inotify_fd, F_GETFL);
fcntl(inotify_fd, F_SETFL, fl | O_NONBLOCK);
}
#endif /* HAVE_SYS_INOTIFY_H */
initialisation(argc, argv);