diff options
Diffstat (limited to 'bus/dir-watch-inotify.c')
-rw-r--r-- | bus/dir-watch-inotify.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bus/dir-watch-inotify.c b/bus/dir-watch-inotify.c index 12fdbb07..ee580d74 100644 --- a/bus/dir-watch-inotify.c +++ b/bus/dir-watch-inotify.c @@ -18,7 +18,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ @@ -97,7 +97,11 @@ bus_watch_directory (const char *dir, BusContext *context) _dbus_assert (dir != NULL); if (inotify_fd == -1) { +#ifdef HAVE_INOTIFY_INIT1 + inotify_fd = inotify_init1 (IN_CLOEXEC); +#else inotify_fd = inotify_init (); +#endif if (inotify_fd <= 0) { _dbus_warn ("Cannot initialize inotify\n"); goto out; |