Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
13b3e9e7
Commit
13b3e9e7
authored
Aug 20, 2018
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
system/FileDescriptor: make inotify_init1() mandatory on Linux
parent
8106929d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
14 deletions
+4
-14
configure.ac
configure.ac
+1
-3
FileDescriptor.cxx
src/system/FileDescriptor.cxx
+2
-10
FileDescriptor.hxx
src/system/FileDescriptor.hxx
+1
-1
No files found.
configure.ac
View file @
13b3e9e7
...
...
@@ -587,9 +587,7 @@ if test x$enable_qobuz != xno || test x$enable_soundcloud != xno || test x$enabl
fi
dnl --------------------------------- inotify ---------------------------------
AC_CHECK_FUNCS(inotify_init inotify_init1)
if test x$ac_cv_func_inotify_init = xno; then
if test x$host_is_linux = xno; then
enable_inotify=no
fi
...
...
src/system/FileDescriptor.cxx
View file @
13b3e9e7
...
...
@@ -45,7 +45,7 @@
#include <sys/signalfd.h>
#endif
#ifdef
HAVE_INOTIFY_INIT
#ifdef
__linux__
#include <sys/inotify.h>
#endif
...
...
@@ -248,23 +248,15 @@ FileDescriptor::CreateSignalFD(const sigset_t *mask) noexcept
#endif
#ifdef
HAVE_INOTIFY_INIT
#ifdef
__linux__
bool
FileDescriptor
::
CreateInotify
()
noexcept
{
#ifdef HAVE_INOTIFY_INIT1
int
new_fd
=
inotify_init1
(
IN_CLOEXEC
|
IN_NONBLOCK
);
#else
int
new_fd
=
inotify_init
();
#endif
if
(
new_fd
<
0
)
return
false
;
#ifndef HAVE_INOTIFY_INIT1
SetNonBlocking
();
#endif
fd
=
new_fd
;
return
true
;
}
...
...
src/system/FileDescriptor.hxx
View file @
13b3e9e7
...
...
@@ -189,7 +189,7 @@ public:
bool
CreateSignalFD
(
const
sigset_t
*
mask
)
noexcept
;
#endif
#ifdef
HAVE_INOTIFY_INIT
#ifdef
__linux__
bool
CreateInotify
()
noexcept
;
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment