1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-18 02:55:12 +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 ce5a64d08a
commit f1c717286b

View File

@ -4291,7 +4291,13 @@ int main(int argc, char **argv)
#endif /* BUILD_WEATHER_XOAP */ #endif /* BUILD_WEATHER_XOAP */
#ifdef HAVE_SYS_INOTIFY_H #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 */ #endif /* HAVE_SYS_INOTIFY_H */
initialisation(argc, argv); initialisation(argc, argv);