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:
parent
ce5a64d08a
commit
f1c717286b
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user