mirror of
https://github.com/Llewellynvdm/conky.git
synced 2025-02-05 13:38:33 +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
02d97f9445
commit
13c973d1b5
@ -5944,7 +5944,13 @@ int main(int argc, char **argv)
|
|||||||
#endif /* XOAP */
|
#endif /* 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…
x
Reference in New Issue
Block a user