mutt stable branch with some hacks
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

add fallback for inotify_init1

+17 -2
+2 -1
configure.ac
··· 854 854 ]) 855 855 856 856 if test x$have_filemonitor != xno ; then 857 - AC_CHECK_FUNCS(inotify_init1 inotify_add_watch inotify_rm_watch, 857 + AC_CHECK_FUNCS(inotify_init inotify_add_watch inotify_rm_watch, 858 858 [], [have_filemonitor=no]) 859 859 if test x$have_filemonitor != xno ; then 860 860 AC_DEFINE(USE_INOTIFY,1,[ Define if want to use inotify for filesystem monitoring (available in Linux only). ]) 861 + AC_CHECK_FUNCS_ONCE(inotify_init1) 861 862 AC_CHECK_HEADERS(sys/inotify.h) 862 863 MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS monitor.o" 863 864 fi
+14
monitor.c
··· 25 25 # include <unistd.h> 26 26 # include <poll.h> 27 27 #endif 28 + #ifndef HAVE_INOTIFY_INIT1 29 + # include <fcntl.h> 30 + #endif 28 31 29 32 #include "mutt.h" 30 33 #include "buffy.h" ··· 106 109 { 107 110 if (INotifyFd == -1) 108 111 { 112 + #if HAVE_INOTIFY_INIT1 109 113 INotifyFd = inotify_init1(IN_NONBLOCK | IN_CLOEXEC); 110 114 if (INotifyFd == -1) 111 115 { 112 116 dprint (2, (debugfile, "monitor: inotify_init1 failed, errno=%d %s\n", errno, strerror(errno))); 113 117 return -1; 114 118 } 119 + #else 120 + INotifyFd = inotify_init(); 121 + if (INotifyFd == -1) 122 + { 123 + dprint (2, (debugfile, "monitor: inotify_init failed, errno=%d %s\n", errno, strerror(errno))); 124 + return -1; 125 + } 126 + fcntl(INotifyFd, F_SETFL, O_NONBLOCK); 127 + fcntl(INotifyFd, F_SETFD, FD_CLOEXEC); 128 + #endif 115 129 mutt_poll_fd_add(0, POLLIN); 116 130 mutt_poll_fd_add(INotifyFd, POLLIN); 117 131 }
+1 -1
monitor.h
··· 1 1 /* 2 - * Copyright (C) 2018 Gero Treuer <gero@70t.de> 2 + * Copyright (C) 2018 Gero Treuner <gero@70t.de> 3 3 * 4 4 * This program is free software; you can redistribute it and/or modify 5 5 * it under the terms of the GNU General Public License as published by