Mercurial > hg > aboriginal
annotate sources/patches/uClibc-backport-humor-udev.patch @ 1355:71acb8c4611a
Kick uClibc 0.9.32-rc3 to UNSTABLE for the moment, and put 0.9.31 back in stable, with its old patch stack.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sat, 21 May 2011 23:37:31 -0500 |
parents | f5bb48a74920 |
children |
rev | line source |
---|---|
1310
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
1 Udev is quite possibly the most brittle program in the history of Linux. |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
2 |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
3 commit 83333e9c873e4eca6b2c945f7770b1f5373b0427 |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
4 Author: Vladimir Zapolskiy <vzapolskiy@gmail.com> |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
5 Date: Tue Jun 1 20:02:39 2010 +0400 |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
6 |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
7 bits/socket.h: add SOCK_CLOEXEC and SOCK_NONBLOCK support |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
8 |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
9 This patch adds support for SOCK_CLOEXEC and SOCK_NONBLOCK socket |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
10 descriptor flags, which are introduced since Linux 2.6.27 |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
11 |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
12 Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com> |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
13 Signed-off-by: Khem Raj <raj.khem@gmail.com> |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
14 |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
15 diff --git a/libc/sysdeps/linux/common/bits/socket.h b/libc/sysdeps/linux/common/bits/socket.h |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
16 index ac5a433..11f6e97 100644 |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
17 --- a/libc/sysdeps/linux/common/bits/socket.h |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
18 +++ b/libc/sysdeps/linux/common/bits/socket.h |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
19 @@ -53,10 +53,20 @@ enum __socket_type |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
20 SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based, |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
21 datagrams of fixed maximum length. */ |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
22 #define SOCK_SEQPACKET SOCK_SEQPACKET |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
23 - SOCK_PACKET = 10 /* Linux specific way of getting packets |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
24 + SOCK_PACKET = 10, /* Linux specific way of getting packets |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
25 at the dev level. For writing rarp and |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
26 other similar things on the user level. */ |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
27 #define SOCK_PACKET SOCK_PACKET |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
28 + |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
29 + /* Flags to be ORed into the type parameter of socket and socketpair and |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
30 + used for the flags parameter of paccept. */ |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
31 + |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
32 + SOCK_CLOEXEC = 02000000, /* Atomically set close-on-exec flag for the |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
33 + new descriptor(s). */ |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
34 +#define SOCK_CLOEXEC SOCK_CLOEXEC |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
35 + SOCK_NONBLOCK = 04000 /* Atomically mark descriptor(s) as |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
36 + non-blocking. */ |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
37 +#define SOCK_NONBLOCK SOCK_NONBLOCK |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
38 }; |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
39 |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
40 /* Protocol families. */ |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
41 commit c6d6237819037168a6923ac080e348e54615422c |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
42 Author: Vladimir Zapolskiy <vzapolskiy@gmail.com> |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
43 Date: Tue Jun 1 23:22:57 2010 +0400 |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
44 |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
45 endian.h: add BSD convertions between big/little-endian byte order |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
46 |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
47 This patch adds support for convertion of values between host and |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
48 big-/little-endian byte order. |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
49 |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
50 Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com> |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
51 Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
52 |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
53 diff --git a/include/endian.h b/include/endian.h |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
54 index 2f7bce1..0ba7384 100644 |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
55 --- a/include/endian.h |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
56 +++ b/include/endian.h |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
57 @@ -55,4 +55,42 @@ |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
58 # define __LONG_LONG_PAIR(HI, LO) HI, LO |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
59 #endif |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
60 |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
61 + |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
62 +#ifdef __USE_BSD |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
63 +/* Conversion interfaces. */ |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
64 +# include <byteswap.h> |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
65 + |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
66 +# if __BYTE_ORDER == __LITTLE_ENDIAN |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
67 +# define htobe16(x) __bswap_16 (x) |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
68 +# define htole16(x) (x) |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
69 +# define be16toh(x) __bswap_16 (x) |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
70 +# define le16toh(x) (x) |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
71 + |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
72 +# define htobe32(x) __bswap_32 (x) |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
73 +# define htole32(x) (x) |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
74 +# define be32toh(x) __bswap_32 (x) |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
75 +# define le32toh(x) (x) |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
76 + |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
77 +# define htobe64(x) __bswap_64 (x) |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
78 +# define htole64(x) (x) |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
79 +# define be64toh(x) __bswap_64 (x) |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
80 +# define le64toh(x) (x) |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
81 +# else |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
82 +# define htobe16(x) (x) |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
83 +# define htole16(x) __bswap_16 (x) |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
84 +# define be16toh(x) (x) |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
85 +# define le16toh(x) __bswap_16 (x) |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
86 + |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
87 +# define htobe32(x) (x) |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
88 +# define htole32(x) __bswap_32 (x) |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
89 +# define be32toh(x) (x) |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
90 +# define le32toh(x) __bswap_32 (x) |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
91 + |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
92 +# define htobe64(x) (x) |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
93 +# define htole64(x) __bswap_64 (x) |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
94 +# define be64toh(x) (x) |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
95 +# define le64toh(x) __bswap_64 (x) |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
96 +# endif |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
97 +#endif |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
98 + |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
99 #endif /* endian.h */ |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
100 commit a2e5630af426f85fdd8721b2820786d9bd2aa695 |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
101 Author: Vladimir Zapolskiy <vzapolskiy@gmail.com> |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
102 Date: Tue Jun 1 20:02:54 2010 +0400 |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
103 |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
104 inotify: add inotify_init1 system call support |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
105 |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
106 This patch introduces support for inotify_init1 system call, found |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
107 since Linux 2.6.27. |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
108 |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
109 Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com> |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
110 Signed-off-by: Khem Raj <raj.khem@gmail.com> |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
111 |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
112 diff --git a/libc/sysdeps/linux/common/inotify.c b/libc/sysdeps/linux/common/inotify.c |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
113 index e5a6120..e35f043 100644 |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
114 --- a/libc/sysdeps/linux/common/inotify.c |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
115 +++ b/libc/sysdeps/linux/common/inotify.c |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
116 @@ -15,6 +15,10 @@ |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
117 _syscall0(int, inotify_init) |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
118 #endif |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
119 |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
120 +#ifdef __NR_inotify_init1 |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
121 +_syscall1(int, inotify_init1, int, flags) |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
122 +#endif |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
123 + |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
124 #ifdef __NR_inotify_add_watch |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
125 _syscall3(int, inotify_add_watch, int, fd, const char *, path, uint32_t, mask) |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
126 #endif |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
127 diff --git a/libc/sysdeps/linux/common/sys/inotify.h b/libc/sysdeps/linux/common/sys/inotify.h |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
128 index 0131db9..dc4e19d 100644 |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
129 --- a/libc/sysdeps/linux/common/sys/inotify.h |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
130 +++ b/libc/sysdeps/linux/common/sys/inotify.h |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
131 @@ -22,6 +22,16 @@ |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
132 #include <stdint.h> |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
133 |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
134 |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
135 +/* Flags for the parameter of inotify_init1. */ |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
136 +enum |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
137 + { |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
138 + IN_CLOEXEC = 02000000, |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
139 +#define IN_CLOEXEC IN_CLOEXEC |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
140 + IN_NONBLOCK = 04000 |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
141 +#define IN_NONBLOCK IN_NONBLOCK |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
142 + }; |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
143 + |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
144 + |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
145 /* Structure describing an inotify event. */ |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
146 struct inotify_event |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
147 { |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
148 @@ -79,6 +89,9 @@ __BEGIN_DECLS |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
149 /* Create and initialize inotify instance. */ |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
150 extern int inotify_init (void) __THROW; |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
151 |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
152 +/* Create and initialize inotify instance. */ |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
153 +extern int inotify_init1 (int __flags) __THROW; |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
154 + |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
155 /* Add watch of object NAME to inotify instance FD. Notify about |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
156 events specified by MASK. */ |
f5bb48a74920
Backport some uClibc bits so udev will build against 0.9.31.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
157 extern int inotify_add_watch (int __fd, const char *__name, uint32_t __mask) |