pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
wip/incron: import incron-0.5.10
Module Name: pkgsrc-wip
Committed By: PHO <pho%cielonegro.org@localhost>
Pushed By: pho
Date: Fri Feb 3 17:22:39 2023 +0900
Changeset: 4cc3272e373a97ce7e93b80828fc5f7ddadc9323
Added Files:
incron/DESCR
incron/Makefile
incron/PLIST
incron/TODO
incron/distinfo
incron/files/glibc-compat.c
incron/files/glibc-compat.h
incron/files/incron.sh
incron/patches/patch-Makefile
incron/patches/patch-appinst.cpp
incron/patches/patch-appinst.h
incron/patches/patch-icd-main.cpp
incron/patches/patch-ict-main.cpp
incron/patches/patch-incron.conf.5
incron/patches/patch-incron.conf.example
incron/patches/patch-incron.h
incron/patches/patch-incroncfg.cpp
incron/patches/patch-inotify-cxx.h
Log Message:
wip/incron: import incron-0.5.10
This program is an "inotify cron" system. It consists of a daemon and a
table manipulator. You can use it a similar way as the regular cron. The
difference is that the inotify cron handles filesystem events rather than
time periods.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=4cc3272e373a97ce7e93b80828fc5f7ddadc9323
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
incron/DESCR | 4 +++
incron/Makefile | 57 ++++++++++++++++++++++++++++++++
incron/PLIST | 8 +++++
incron/TODO | 35 ++++++++++++++++++++
incron/distinfo | 15 +++++++++
incron/files/glibc-compat.c | 25 ++++++++++++++
incron/files/glibc-compat.h | 16 +++++++++
incron/files/incron.sh | 16 +++++++++
incron/patches/patch-Makefile | 19 +++++++++++
incron/patches/patch-appinst.cpp | 14 ++++++++
incron/patches/patch-appinst.h | 15 +++++++++
incron/patches/patch-icd-main.cpp | 15 +++++++++
incron/patches/patch-ict-main.cpp | 14 ++++++++
incron/patches/patch-incron.conf.5 | 47 ++++++++++++++++++++++++++
incron/patches/patch-incron.conf.example | 53 +++++++++++++++++++++++++++++
incron/patches/patch-incron.h | 15 +++++++++
incron/patches/patch-incroncfg.cpp | 32 ++++++++++++++++++
incron/patches/patch-inotify-cxx.h | 18 ++++++++++
18 files changed, 418 insertions(+)
diffs:
diff --git a/incron/DESCR b/incron/DESCR
new file mode 100644
index 0000000000..27b86addd6
--- /dev/null
+++ b/incron/DESCR
@@ -0,0 +1,4 @@
+This program is an "inotify cron" system. It consists of a daemon and a
+table manipulator. You can use it a similar way as the regular cron. The
+difference is that the inotify cron handles filesystem events rather than
+time periods.
diff --git a/incron/Makefile b/incron/Makefile
new file mode 100644
index 0000000000..553a957bbe
--- /dev/null
+++ b/incron/Makefile
@@ -0,0 +1,57 @@
+# $NetBSD$
+
+DISTNAME= incron-0.5.10
+CATEGORIES= sysutils
+MASTER_SITES= http://inotify.aiken.cz/download/incron/
+
+MAINTAINER= pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE= http://inotify.aiken.cz/?section=incron&page=doc&lang=en
+COMMENT= Inotify cron system
+LICENSE= gnu-gpl-v2
+
+USE_LANGUAGES= c++
+
+.include "../../mk/bsd.fast.prefs.mk"
+.if ${OPSYS} != "Linux"
+LDFLAGS+= -linotify
+.endif
+#CXXFLAGS+= -g
+
+SUBST_CLASSES+= paths
+SUBST_MESSAGE.paths= Substituting hard-coded system paths
+SUBST_STAGE.paths= pre-build
+SUBST_FILES.paths= \
+ appinst.h \
+ incron.conf.5 \
+ incron.conf.example \
+ incron.h \
+ incroncfg.cpp
+SUBST_VARS.paths= PKG_SYSCONFBASE VARBASE
+
+pre-build:
+ ln -sf ${FILESDIR}/glibc-compat.c ${FILESDIR}/glibc-compat.h ${WRKSRC}/
+
+BUILD_DEFS+= PKG_SYSCONFBASE VARBASE
+MAKE_DIRS+= ${PKG_SYSCONFBASE}/incron.d
+OWN_DIRS+= ${VARBASE}/spool/incron
+RCD_SCRIPTS+= incron
+SPECIAL_PERMS+= bin/incrontab ${SETUID_ROOT_PERMS}
+CONF_FILES+= \
+ share/examples/incron/incron.conf.example \
+ ${PKG_SYSCONFBASE}/incron.conf
+
+INSTALLATION_DIRS+= bin sbin
+INSTALLATION_DIRS+= ${PKGMANDIR}/man1 ${PKGMANDIR}/man5 ${PKGMANDIR}/man8
+INSTALLATION_DIRS+= share/examples/incron
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/incrontab ${DESTDIR}/${PREFIX}/bin/
+ ${INSTALL_PROGRAM} ${WRKSRC}/incrond ${DESTDIR}/${PREFIX}/sbin/
+ ${INSTALL_MAN} ${WRKSRC}/incrontab.1 ${DESTDIR}/${PREFIX}/${PKGMANDIR}/man1/
+ ${INSTALL_MAN} ${WRKSRC}/incrontab.5 ${DESTDIR}/${PREFIX}/${PKGMANDIR}/man5/
+ ${INSTALL_MAN} ${WRKSRC}/incrond.8 ${DESTDIR}/${PREFIX}/${PKGMANDIR}/man8/
+ ${INSTALL_MAN} ${WRKSRC}/incron.conf.5 ${DESTDIR}/${PREFIX}/${PKGMANDIR}/man5/
+ ${INSTALL_DATA} ${WRKSRC}/incron.conf.example ${DESTDIR}/${PREFIX}/share/examples/incron/
+
+.include "../../devel/libinotify/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/incron/PLIST b/incron/PLIST
new file mode 100644
index 0000000000..22bb55e702
--- /dev/null
+++ b/incron/PLIST
@@ -0,0 +1,8 @@
+@comment $NetBSD$
+bin/incrontab
+man/man1/incrontab.1
+man/man5/incron.conf.5
+man/man5/incrontab.5
+man/man8/incrond.8
+sbin/incrond
+share/examples/incron/incron.conf.example
diff --git a/incron/TODO b/incron/TODO
new file mode 100644
index 0000000000..a3084e70e6
--- /dev/null
+++ b/incron/TODO
@@ -0,0 +1,35 @@
+<!-- -*- markdown -*- -->
+
+1. This doesn't properly work on NetBSD 9 due to the lack of
+ `NOTE_CLOSE_WRITE` support in `kqueue(2)`.
+2. When at least one user has an incrontab entry, `incrond` crashes on exit
+ by throwing `InotifyException` from `Inotify::Remove()` which is somehow
+ not caught by `main()`.
+
+ * I have no clue why it's not caught. `main()` does have a try...catch
+ block.
+ * The exception is thrown because `inotify_rm_watch(3)` returns
+ -1/EINVAL. This doesn't make any sense because chasing it with GDB
+ reveals that the libinotify worker thread does return 0 from
+ `worker_remove()`. Its direct caller, `process_command()`, looks fishy
+ because `worker_cmd *cmd` is shared by two threads in a rather unusual
+ manner, that is:
+
+ 1. The kqueue thread (the caller of public API) first creates a
+ `worker_cmd`.
+ 2. It then writes its pointer value to a pipe.
+ 3. Wait for the completion with `ik_sem_wait()` in `compat.h`, which
+ locks a mutex and calls `pthread_cond_wait(3)`.
+ 4. The worker thread is woken up when the pointer is written to the
+ pipe.
+ 5. It reads the pointer value from the pipe, writes the result of the
+ command to the `worker_cmd`, then performs `ik_sem_post()` to
+ signal the completion by locking the mutex, calling
+ `pthread_cond_broadcast(3)`, and then unlocking it.
+ 6. The caller is woken up, unlocks the mutex, then reads the
+ result. The result, though, appears to be corrupt.
+
+ So, the worker thread modifies the contents of `worker_cmd` before
+ locking the mutex. And the caller thread observes its contents after
+ unlocking the mutex. Is this really safe? I don't know, as I'm not an
+ expert in this area.
diff --git a/incron/distinfo b/incron/distinfo
new file mode 100644
index 0000000000..f55640bf84
--- /dev/null
+++ b/incron/distinfo
@@ -0,0 +1,15 @@
+$NetBSD$
+
+BLAKE2s (incron-0.5.10.tar.gz) = 303c2100d046848c38de70f4165388f5235ad0810c09e04e77d0788df27298ad
+SHA512 (incron-0.5.10.tar.gz) = 653817c35059b5305e059137eac78f21a7d32ccc03fc92ba282eab66ba5f3d2c83a1a571ebdcead8df3ed500a7fd30cfa46375c635450b08d2bd8d00dfe86df3
+Size (incron-0.5.10.tar.gz) = 203158 bytes
+SHA1 (patch-Makefile) = 049b672c11654b6b7de0f07080d4166e82fa31a3
+SHA1 (patch-appinst.cpp) = 6f8e10cfe16e9500fedfc69f117e976c6601205d
+SHA1 (patch-appinst.h) = c5069c66f7fe6f5f9f8004b39cca04cd67daa244
+SHA1 (patch-icd-main.cpp) = 1e8b98efd13358707a9463eafa7cd328d6fb7d78
+SHA1 (patch-ict-main.cpp) = d4e86b8e26c942f5324f22014a6bd44d5f73e7c9
+SHA1 (patch-incron.conf.5) = 0940d51beb00f5d978077234a79c9b9f542fa3f0
+SHA1 (patch-incron.conf.example) = ea6155eaa38c5ceaf4abf9f73dca4de3966cb173
+SHA1 (patch-incron.h) = f647b9c7011c76c91b643fd4f96394c30ac1f843
+SHA1 (patch-incroncfg.cpp) = c9c5bf41ef35f7cd0e0c02b546d5fa03800dfaca
+SHA1 (patch-inotify-cxx.h) = 44d06f77c6542dd4b29c005028f4107c15310fd7
diff --git a/incron/files/glibc-compat.c b/incron/files/glibc-compat.c
new file mode 100644
index 0000000000..319c029690
--- /dev/null
+++ b/incron/files/glibc-compat.c
@@ -0,0 +1,25 @@
+/* $NetBSD$ */
+#include <fcntl.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include "glibc-compat.h"
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+extern char **environ;
+
+int clearenv(void) {
+ environ = (char **)calloc(1, sizeof(*environ));
+ return 0;
+}
+
+int euidaccess(const char *pathname, int mode) {
+ return faccessat(AT_FDCWD, pathname, mode, AT_EACCESS);
+}
+
+#if defined(__cplusplus)
+}
+#endif
diff --git a/incron/files/glibc-compat.h b/incron/files/glibc-compat.h
new file mode 100644
index 0000000000..698dca15c4
--- /dev/null
+++ b/incron/files/glibc-compat.h
@@ -0,0 +1,16 @@
+/* $NetBSD$
+ *
+ * Shims to functions that can only be found in glibc. These are weak
+ * symbols so that they won't conflict with native ones.
+ */
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+int clearenv(void) __attribute__((__weak__));
+int euidaccess(const char *pathname, int mode) __attribute__((__weak__));
+
+#if defined(__cplusplus)
+}
+#endif
diff --git a/incron/files/incron.sh b/incron/files/incron.sh
new file mode 100644
index 0000000000..8fa9ba2645
--- /dev/null
+++ b/incron/files/incron.sh
@@ -0,0 +1,16 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD$
+#
+# PROVIDE: incron
+# REQUIRE: DISKS
+
+$_rc_subr_loaded . @SYSCONFBASE@/rc.subr
+
+name="incron"
+rcvar="$name"
+command="@PREFIX@/sbin/incrond"
+pidfile="@VARBASE@/run/incrond.pid"
+
+load_rc_config "$name"
+run_rc_command "$1"
diff --git a/incron/patches/patch-Makefile b/incron/patches/patch-Makefile
new file mode 100644
index 0000000000..c3264f0717
--- /dev/null
+++ b/incron/patches/patch-Makefile
@@ -0,0 +1,19 @@
+$NetBSD$
+
+Fix build on non-Linux systems. See files/glibc-compat.*
+
+--- Makefile.orig 2012-04-06 22:19:27.000000000 +0000
++++ Makefile
+@@ -26,6 +26,12 @@ PROGRAMS = incrond incrontab
+ INCROND_OBJ = icd-main.o incrontab.o inotify-cxx.o usertable.o strtok.o appinst.o incroncfg.o appargs.o
+ INCRONTAB_OBJ = ict-main.o incrontab.o inotify-cxx.o strtok.o incroncfg.o appargs.o
+
++CXXFLAGS += -include glibc-compat.h
++INCROND_OBJ += glibc-compat.o
++glibc-compat.o: glibc-compat.h glibc-compat.c
++.c.o:
++ $(CXX) -c $(CXXFLAGS) -o $@ $<
++
+
+ all: $(PROGRAMS)
+
diff --git a/incron/patches/patch-appinst.cpp b/incron/patches/patch-appinst.cpp
new file mode 100644
index 0000000000..2b9bfcda1d
--- /dev/null
+++ b/incron/patches/patch-appinst.cpp
@@ -0,0 +1,14 @@
+$NetBSD$
+
+Fix build on non-Linux systems.
+
+--- appinst.cpp.orig 2012-04-06 22:19:27.000000000 +0000
++++ appinst.cpp
+@@ -26,6 +26,7 @@
+ #include <errno.h>
+ #include <signal.h>
+ #include <cstdio>
++#include <sys/stat.h>
+
+ #include "appinst.h"
+
diff --git a/incron/patches/patch-appinst.h b/incron/patches/patch-appinst.h
new file mode 100644
index 0000000000..254fd64b2d
--- /dev/null
+++ b/incron/patches/patch-appinst.h
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Do not hardcode system paths. This is pkgsrc-specific.
+
+--- appinst.h.orig 2023-02-03 01:52:35.609771302 +0000
++++ appinst.h
+@@ -25,7 +25,7 @@
+ #include <string>
+
+
+-#define APPLOCK_BASEDIR "/var/run"
++#define APPLOCK_BASEDIR "@VARBASE@/run"
+
+
+ /// Exception class.
diff --git a/incron/patches/patch-icd-main.cpp b/incron/patches/patch-icd-main.cpp
new file mode 100644
index 0000000000..23a2b85815
--- /dev/null
+++ b/incron/patches/patch-icd-main.cpp
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Fix build on non-Linux systems.
+
+--- icd-main.cpp.orig 2012-04-06 22:19:27.000000000 +0000
++++ icd-main.cpp
+@@ -18,7 +18,7 @@
+
+ #include <map>
+ #include <signal.h>
+-#include <wait.h>
++#include <unistd.h>
+ #include <fcntl.h>
+ #include <pwd.h>
+ #include <dirent.h>
diff --git a/incron/patches/patch-ict-main.cpp b/incron/patches/patch-ict-main.cpp
new file mode 100644
index 0000000000..7f7f2b2eb2
--- /dev/null
+++ b/incron/patches/patch-ict-main.cpp
@@ -0,0 +1,14 @@
+$NetBSD$
+
+Fix build on non-Linux systems.
+
+--- ict-main.cpp.orig 2012-04-06 22:19:27.000000000 +0000
++++ ict-main.cpp
+@@ -18,7 +18,6 @@
+ */
+
+
+-#include <argp.h>
+ #include <pwd.h>
+ #include <string>
+ #include <unistd.h>
diff --git a/incron/patches/patch-incron.conf.5 b/incron/patches/patch-incron.conf.5
new file mode 100644
index 0000000000..fb6cb805bf
--- /dev/null
+++ b/incron/patches/patch-incron.conf.5
@@ -0,0 +1,47 @@
+$NetBSD$
+
+Do not hardcode system paths. This is pkgsrc-specific.
+
+--- incron.conf.5.orig 2023-02-03 02:31:41.398380716 +0000
++++ incron.conf.5
+@@ -1,8 +1,8 @@
+ .TH "incron.conf" "5" "0.5.10" "Lukas Jelinek" "incron documentation"
+ .SH "NAME"
+-/etc/incron.conf \- main config file for inotify cron (incron)
++@PKG_SYSCONFBASE@/incron.conf \- main config file for inotify cron (incron)
+ .SH "DESCRIPTION"
+-The file \fI/etc/incron.conf\fR contains default settings for the program
++The file \fI@PKG_SYSCONFBASE@/incron.conf\fR contains default settings for the program
+ .BR incrond.
+ Each line holds a single value pair in the form \fIoption\fR = \fIvalue\fR.
+ Comment lines must have a hash sign (#) in the first line.
+@@ -11,24 +11,24 @@ The valid configuration options are:
+ .TP
+ \fBsystem_table_dir\fP
+ This directory is examined by incrond for system table files.
+-.BR Default : \fI/etc/incron.d\fR
++.BR Default : \fI@PKG_SYSCONFBASE@/incron.d\fR
+ .TP
+ \fBuser_table_dir\fP
+ This directory is examined by incrond for user table files.
+-.BR Default : \fI/var/spool/incron\fR
++.BR Default : \fI@VARBASE@/spool/incron\fR
+ .TP
+ \fBallowed_users\fP
+ This file contains users allowed to use incron.
+-.BR Default : \fI/etc/incron.allow\fR
++.BR Default : \fI@PKG_SYSCONFBASE@/incron.allow\fR
+ .TP
+ \fBdenied_users\fP
+ This file contains users denied to use incron.
+-.BR Default : \fI/etc/incron.deny\fR
++.BR Default : \fI@PKG_SYSCONFBASE@/incron.deny\fR
+ .TP
+ \fBlockfile_dir\fP
+ This directory is used for creating a lock avoiding to run multiple instances
+ of incrond.
+-.BR Default : \fI/var/run\fR
++.BR Default : \fI@VARBASE@/run\fR
+ .TP
+ \fBlockfile_name\fP
+ This name (appended by '.pid') is used for creating a lock avoiding to run multiple instances of incrond.
diff --git a/incron/patches/patch-incron.conf.example b/incron/patches/patch-incron.conf.example
new file mode 100644
index 0000000000..bf22a959bf
--- /dev/null
+++ b/incron/patches/patch-incron.conf.example
@@ -0,0 +1,53 @@
+$NetBSD$
+
+Do not hardcode system paths. This is pkgsrc-specific.
+
+--- incron.conf.example.orig 2023-02-02 19:43:38.785265088 +0000
++++ incron.conf.example
+@@ -8,7 +8,7 @@
+ # Parameter: system_table_dir
+ # Meaning: system table directory
+ # Description: This directory is examined by incrond for system table files.
+-# Default: /etc/incron.d
++# Default: @PKG_SYSCONFBASE@/incron.d
+ #
+ # Example:
+ # system_table_dir = /var/spool/incron.systables
+@@ -17,7 +17,7 @@
+ # Parameter: user_table_dir
+ # Meaning: user table directory
+ # Description: This directory is examined by incrond for user table files.
+-# Default: /var/spool/incron
++# Default: @VARBASE@/spool/incron
+ #
+ # Example:
+ # user_table_dir = /var/spool/incron.usertables
+@@ -26,16 +26,16 @@
+ # Parameter: allowed_users
+ # Meaning: allowed users list file
+ # Description: This file contains users allowed to use incron.
+-# Default: /etc/incron.allow
++# Default: @PKG_SYSCONFBASE@/incron.allow
+ #
+ # Example:
+-# allowed_users = /etc/incron/allow
++# allowed_users = @PKG_SYSCONFBASE@/incron/allow
+
+
+ # Parameter: denied_users
+ # Meaning: denied users list file
+ # Description: This file contains users denied to use incron.
+-# Default: /etc/incron.deny
++# Default: @PKG_SYSCONFBASE@/incron.deny
+ #
+ # Example:
+ # denied_users = /etc/incron/deny
+@@ -45,7 +45,7 @@
+ # Meaning: application lock file directory
+ # Description: This directory is used for creating a lock avoiding to run
+ # multiple instances of incrond.
+-# Default: /var/run
++# Default: @VARBASE@/run
+ #
+ # Example:
+ # lockfile_dir = /tmp
diff --git a/incron/patches/patch-incron.h b/incron/patches/patch-incron.h
new file mode 100644
index 0000000000..d94c171090
--- /dev/null
+++ b/incron/patches/patch-incron.h
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Do not hardcode system paths. This is pkgsrc-specific.
+
+--- incron.h.orig 2023-02-03 02:00:21.341596994 +0000
++++ incron.h
+@@ -33,7 +33,7 @@
+ #define INCRON_BUG_ADDRESS "<bugs%aiken.cz@localhost>"
+
+ /// Default configuration file
+-#define INCRON_CONFIG "/etc/incron.conf"
++#define INCRON_CONFIG "@PKG_SYSCONFBASE@/incron.conf"
+
+
+ #endif //_INCRON_H_
diff --git a/incron/patches/patch-incroncfg.cpp b/incron/patches/patch-incroncfg.cpp
new file mode 100644
index 0000000000..00ceb30189
--- /dev/null
+++ b/incron/patches/patch-incroncfg.cpp
@@ -0,0 +1,32 @@
+$NetBSD$
+
+Do not hardcode system paths. This is pkgsrc-specific.
+
+--- incroncfg.cpp.orig 2023-02-02 20:15:05.818702837 +0000
++++ incroncfg.cpp
+@@ -24,7 +24,7 @@
+ #include "incroncfg.h"
+
+
+-#define INCRON_CFG_DEFAULT "/etc/incron.conf"
++#define INCRON_CFG_DEFAULT "@PKG_SYSCONFBASE@/incron.conf"
+
+
+ typedef std::map<std::string, std::string> CFG_MAP;
+@@ -37,11 +37,11 @@ CFG_MAP IncronCfg::m_defaults;
+
+ void IncronCfg::Init()
+ {
+- m_defaults.insert(CFG_MAP::value_type("system_table_dir", "/etc/incron.d"));
+- m_defaults.insert(CFG_MAP::value_type("user_table_dir", "/var/spool/incron"));
+- m_defaults.insert(CFG_MAP::value_type("allowed_users", "/etc/incron.allow"));
+- m_defaults.insert(CFG_MAP::value_type("denied_users", "/etc/incron.deny"));
+- m_defaults.insert(CFG_MAP::value_type("lockfile_dir", "/var/run"));
++ m_defaults.insert(CFG_MAP::value_type("system_table_dir", "@PKG_SYSCONFBASE@/incron.d"));
++ m_defaults.insert(CFG_MAP::value_type("user_table_dir", "@VARBASE@/spool/incron"));
++ m_defaults.insert(CFG_MAP::value_type("allowed_users", "@PKG_SYSCONFBASE@/incron.allow"));
++ m_defaults.insert(CFG_MAP::value_type("denied_users", "@PKG_SYSCONFBASE@/incron.deny"));
++ m_defaults.insert(CFG_MAP::value_type("lockfile_dir", "@VARBASE@/run"));
+ m_defaults.insert(CFG_MAP::value_type("lockfile_name", "incrond"));
+ m_defaults.insert(CFG_MAP::value_type("editor", ""));
+ }
diff --git a/incron/patches/patch-inotify-cxx.h b/incron/patches/patch-inotify-cxx.h
new file mode 100644
index 0000000000..103a491edf
--- /dev/null
+++ b/incron/patches/patch-inotify-cxx.h
@@ -0,0 +1,18 @@
+$NetBSD$
+
+Fix build with non-Linux systems. __NR_inotify_init isn't used anyway.
+
+--- inotify-cxx.h.orig 2012-04-06 22:19:27.000000000 +0000
++++ inotify-cxx.h
+@@ -35,11 +35,6 @@
+ #include <sys/syscall.h>
+ #include <sys/inotify.h>
+
+-// Use this if syscalls not defined
+-#ifndef __NR_inotify_init
+-#include <sys/inotify-syscalls.h>
+-#endif // __NR_inotify_init
+-
+ /// Event struct size
+ #define INOTIFY_EVENT_SIZE (sizeof(struct inotify_event))
+
Home |
Main Index |
Thread Index |
Old Index