On linux systems not having sys/inotify.h, eio doesnt build. So here is a patch that declares functions inotify_init(), inotify_add_watch() and inotify_rm_watch() to get it work on those old versions.
Please review, and thanks for everything
Index: src/lib/eio_inotify.c
===================================================================
--- src/lib/eio_inotify.c (révision 67319)
+++ src/lib/eio_inotify.c (copie de travail)
@@ -25,6 +25,9 @@
#else
# include <asm/unistd.h>
# include <linux/inotify.h>
+static inline int inotify_init(void);
+static inline int inotify_add_watch(int fd, const char *name, __u32 mask);
+static inline int inotify_rm_watch(int fd, __u32 wd);
#endif
struct _Eio_Monitor_Backend
@@ -205,3 +208,23 @@ void eio_monitor_backend_del(Eio_Monitor *monitor)
eina_hash_del(_inotify_monitors, &monitor->backend->hwnd, monitor->backend);
monitor->backend = NULL;
}
+
+#ifndef HAVE_SYS_INOTIFY
+static inline int
+inotify_init(void)
+{
+ return syscall(__NR_inotify_init);
+}
+
+static inline int
+inotify_add_watch(int fd, const char *name, __u32 mask)
+{
+ return syscall(__NR_inotify_add_watch, fd, name, mask);
+}
+
+static inline int
+inotify_rm_watch(int fd, __u32 wd)
+{
+ return syscall(__NR_inotify_rm_watch, fd, wd);
+}
+#endif
<<attachment: guillaume_friloux.vcf>>
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
