# --- T2-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # T2 SDE: package/.../dietlibc/inotify_init1.patch # Copyright (C) 2011 The T2 SDE Project # # More information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # --- T2-COPYRIGHT-NOTE-END --- For udev, too. - Rene Rebe --- /dev/null 2010-10-27 14:43:31.488782000 +0200 +++ dietlibc/syscalls.s/inotify_init1.S 2011-01-05 15:37:28.000000000 +0100 @@ -0,0 +1,3 @@ +#include "syscalls.h" + +syscall(inotify_init1,inotify_init1) --- dietlibc/include/fcntl.h.vanilla 2011-01-05 18:58:56.000000000 +0100 +++ dietlibc/include/fcntl.h 2011-01-05 18:59:14.000000000 +0100 @@ -34,6 +34,7 @@ #define O_DIRECTORY 0200000 /* must be a directory */ #define O_NOFOLLOW 0400000 /* don't follow links */ #define O_NOATIME 01000000 +#define O_CLOEXEC 02000000 #define F_DUPFD 0 /* dup */ #define F_GETFD 1 /* get close_on_exec */ @@ -118,6 +118,7 @@ #define O_LARGEFILE 0400000 /* will be set by the kernel on every open */ #define O_DIRECT 02000000 /* direct disk access - should check with OSF/1 */ #define O_NOATIME 04000000 +#define O_CLOEXEC 010000000 /* set close_on_exec */ #define F_DUPFD 0 /* dup */ #define F_GETFD 1 /* get close_on_exec */ @@ -187,6 +188,7 @@ #define O_DIRECTORY 0x10000 /* must be a directory */ #define O_NOFOLLOW 0x20000 /* don't follow links */ #define O_NOATIME 0x40000 +#define O_CLOEXEC 0x80000 /* set close_on_exec */ #define O_NDELAY O_NONBLOCK @@ -287,6 +290,7 @@ #define O_LARGEFILE 0x40000 #define O_DIRECT 0x100000 /* direct disk access hint */ #define O_NOATIME 0x200000 +#define O_CLOEXEC 0x400000 /* set close_on_exec */ #define F_DUPFD 0 /* dup */ #define F_GETFD 1 /* get close_on_exec */ @@ -376,6 +380,7 @@ #define O_LARGEFILE 0200000 #define O_DIRECT 0400000 /* direct disk access hint - currently ignored */ #define O_NOATIME 01000000 +#define O_CLOEXEC 02000000 /* set close_on_exec */ #define F_DUPFD 0 /* dup */ #define F_GETFD 1 /* get close_on_exec */ @@ -460,6 +465,7 @@ #define O_DIRECT 0200000 /* direct disk access hint - currently ignored */ #define O_LARGEFILE 0400000 #define O_NOATIME 01000000 +#define O_CLOEXEC 02000000 /* set close_on_exec */ #define F_DUPFD 0 /* dup */ #define F_GETFD 1 /* get close_on_exec */ @@ -544,6 +550,8 @@ #define O_DSYNC 01000000 /* HPUX only */ #define O_RSYNC 02000000 /* HPUX only */ #define O_NOATIME 04000000 +#define O_CLOEXEC 010000000 /* set close_on_exec */ + #define O_DIRECTORY 00010000 #define O_DIRECT 00040000 /* direct disk access hint - currently ignored */ --- dietlibc/include/sys/inotify.h.vanilla 2011-01-05 18:40:06.000000000 +0100 +++ dietlibc/include/sys/inotify.h 2011-01-05 18:42:04.000000000 +0100 @@ -42,6 +42,11 @@ #define IN_ISDIR 0x40000000 /* event occurred against dir */ #define IN_ONESHOT 0x80000000 /* only send event once */ + +/* Flags for sys_inotify_init1. */ +#define IN_CLOEXEC O_CLOEXEC +#define IN_NONBLOCK O_NONBLOCK + /* * All of the events - we build the list by hand so that we can add flags in * the future and not break backward compatibility. Apps will get only the @@ -56,6 +61,7 @@ __BEGIN_DECLS int inotify_init(void) __THROW; +int inotify_init1(int flags) __THROW; int inotify_add_watch(int fd,const char* path,unsigned long mask); int inotify_rm_watch(int fd,int wd);