summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2020-09-16 20:38:29 +0200
committerMax Kellermann <max@musicpd.org>2020-09-16 20:39:44 +0200
commite81bb5d8f18c3d4de9a591cd85cd33a2a47692a6 (patch)
tree1eb04e9ff66d76dbff9a6c53a11f34cf21f59ec9
parent32f4f15831573c94e19fbd14f3c77d80a4408f2c (diff)
db/update/Inotify*: include cleanup
-rw-r--r--src/db/update/InotifySource.cxx8
-rw-r--r--src/db/update/InotifySource.hxx3
-rw-r--r--src/db/update/InotifyUpdate.cxx10
-rw-r--r--src/db/update/InotifyUpdate.hxx2
4 files changed, 9 insertions, 14 deletions
diff --git a/src/db/update/InotifySource.cxx b/src/db/update/InotifySource.cxx
index e0509715c..ac3c931ff 100644
--- a/src/db/update/InotifySource.cxx
+++ b/src/db/update/InotifySource.cxx
@@ -24,11 +24,11 @@
#include "system/Error.hxx"
#include "Log.hxx"
+#include <cerrno>
+#include <climits>
+#include <cstdint>
+
#include <sys/inotify.h>
-#include <unistd.h>
-#include <errno.h>
-#include <stdint.h>
-#include <limits.h>
bool
InotifySource::OnSocketReady(gcc_unused unsigned flags) noexcept
diff --git a/src/db/update/InotifySource.hxx b/src/db/update/InotifySource.hxx
index dadefec90..43225df56 100644
--- a/src/db/update/InotifySource.hxx
+++ b/src/db/update/InotifySource.hxx
@@ -21,9 +21,6 @@
#define MPD_INOTIFY_SOURCE_HXX
#include "event/SocketMonitor.hxx"
-#include "util/Compiler.h"
-
-class FileDescriptor;
typedef void (*mpd_inotify_callback_t)(int wd, unsigned mask,
const char *name, void *ctx);
diff --git a/src/db/update/InotifyUpdate.cxx b/src/db/update/InotifyUpdate.cxx
index 0885aa435..b19961ade 100644
--- a/src/db/update/InotifyUpdate.cxx
+++ b/src/db/update/InotifyUpdate.cxx
@@ -27,13 +27,13 @@
#include "fs/Traits.hxx"
#include "Log.hxx"
-#include <string>
-#include <map>
+#include <cassert>
+#include <cstring>
#include <forward_list>
+#include <map>
+#include <string>
-#include <assert.h>
#include <sys/inotify.h>
-#include <string.h>
#include <dirent.h>
static constexpr unsigned IN_MASK =
@@ -148,7 +148,7 @@ WatchDirectory::GetUriFS() const noexcept
static bool skip_path(const char *path)
{
return PathTraitsFS::IsSpecialFilename(path) ||
- strchr(path, '\n') != nullptr;
+ std::strchr(path, '\n') != nullptr;
}
static void
diff --git a/src/db/update/InotifyUpdate.hxx b/src/db/update/InotifyUpdate.hxx
index 8f9f7d99b..47fda5e66 100644
--- a/src/db/update/InotifyUpdate.hxx
+++ b/src/db/update/InotifyUpdate.hxx
@@ -20,8 +20,6 @@
#ifndef MPD_INOTIFY_UPDATE_HXX
#define MPD_INOTIFY_UPDATE_HXX
-#include "util/Compiler.h"
-
class EventLoop;
class Storage;
class UpdateService;