diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-core/uclibc/uclibc-git.inc | 5 | ||||
-rw-r--r-- | meta/recipes-core/uclibc/uclibc-git/0001-Revert-utent.c-wtent.c-move-functions-from-utxent.c.patch | 321 |
2 files changed, 324 insertions, 2 deletions
diff --git a/meta/recipes-core/uclibc/uclibc-git.inc b/meta/recipes-core/uclibc/uclibc-git.inc index eec4dedfa5..4da9c58f32 100644 --- a/meta/recipes-core/uclibc/uclibc-git.inc +++ b/meta/recipes-core/uclibc/uclibc-git.inc | |||
@@ -1,9 +1,9 @@ | |||
1 | SRCREV="555ae2e88cd16a83f854634b6c3f35715b11d3d4" | 1 | SRCREV="cb43f2afba0633400387fa7c55dda3396517f58a" |
2 | 2 | ||
3 | DEFAULT_PREFERENCE = "-1" | 3 | DEFAULT_PREFERENCE = "-1" |
4 | 4 | ||
5 | PV = "0.9.33+git${SRCPV}" | 5 | PV = "0.9.33+git${SRCPV}" |
6 | PR = "${INC_PR}.3" | 6 | PR = "${INC_PR}.4" |
7 | 7 | ||
8 | FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/uclibc-git' ], d)}" | 8 | FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/uclibc-git' ], d)}" |
9 | 9 | ||
@@ -26,5 +26,6 @@ SRC_URI = "git://uclibc.org/uClibc.git;branch=master;protocol=git \ | |||
26 | file://0001-nptl-atfork-Hide-pthread_atfork-in-shared-versions.patch \ | 26 | file://0001-nptl-atfork-Hide-pthread_atfork-in-shared-versions.patch \ |
27 | file://0001-librt-Use-nodefaultlibs-instead-of-nostdlib.patch \ | 27 | file://0001-librt-Use-nodefaultlibs-instead-of-nostdlib.patch \ |
28 | file://mount.h-update.patch \ | 28 | file://mount.h-update.patch \ |
29 | file://0001-Revert-utent.c-wtent.c-move-functions-from-utxent.c.patch \ | ||
29 | " | 30 | " |
30 | S = "${WORKDIR}/git" | 31 | S = "${WORKDIR}/git" |
diff --git a/meta/recipes-core/uclibc/uclibc-git/0001-Revert-utent.c-wtent.c-move-functions-from-utxent.c.patch b/meta/recipes-core/uclibc/uclibc-git/0001-Revert-utent.c-wtent.c-move-functions-from-utxent.c.patch new file mode 100644 index 0000000000..8c202ace47 --- /dev/null +++ b/meta/recipes-core/uclibc/uclibc-git/0001-Revert-utent.c-wtent.c-move-functions-from-utxent.c.patch | |||
@@ -0,0 +1,321 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | From 096abf14d2dc978607ccd8a0d7f42da65d8991f3 Mon Sep 17 00:00:00 2001 | ||
4 | From: Khem Raj <raj.khem@gmail.com> | ||
5 | Date: Sun, 9 Sep 2012 22:00:04 -0700 | ||
6 | Subject: [PATCH] Revert "utent.c, wtent.c: move functions from utxent.c" | ||
7 | |||
8 | This reverts commit 84135275cfeebc0b233c1c96eeada4d4178a0b18. | ||
9 | --- | ||
10 | include/utmp.h | 8 +++++ | ||
11 | libc/misc/utmp/utent.c | 80 +++++++++++------------------------------------ | ||
12 | libc/misc/utmp/utxent.c | 4 +-- | ||
13 | libc/misc/utmp/wtent.c | 14 ++------- | ||
14 | 4 files changed, 30 insertions(+), 76 deletions(-) | ||
15 | |||
16 | diff --git a/include/utmp.h b/include/utmp.h | ||
17 | index cb8e08f..10b75c9 100644 | ||
18 | --- a/include/utmp.h | ||
19 | +++ b/include/utmp.h | ||
20 | @@ -57,29 +57,37 @@ extern void logwtmp (__const char *__ut_line, __const char *__ut_name, | ||
21 | /* Append entry UTMP to the wtmp-like file WTMP_FILE. */ | ||
22 | extern void updwtmp (__const char *__wtmp_file, __const struct utmp *__utmp) | ||
23 | __THROW; | ||
24 | +libc_hidden_proto(updwtmp) | ||
25 | |||
26 | /* Change name of the utmp file to be examined. */ | ||
27 | extern int utmpname (__const char *__file) __THROW; | ||
28 | +libc_hidden_proto(utmpname) | ||
29 | |||
30 | /* Read next entry from a utmp-like file. */ | ||
31 | extern struct utmp *getutent (void) __THROW; | ||
32 | +libc_hidden_proto(getutent) | ||
33 | |||
34 | /* Reset the input stream to the beginning of the file. */ | ||
35 | extern void setutent (void) __THROW; | ||
36 | +libc_hidden_proto(setutent) | ||
37 | |||
38 | /* Close the current open file. */ | ||
39 | extern void endutent (void) __THROW; | ||
40 | +libc_hidden_proto(endutent) | ||
41 | |||
42 | /* Search forward from the current point in the utmp file until the | ||
43 | next entry with a ut_type matching ID->ut_type. */ | ||
44 | extern struct utmp *getutid (__const struct utmp *__id) __THROW; | ||
45 | +libc_hidden_proto(getutid) | ||
46 | |||
47 | /* Search forward from the current point in the utmp file until the | ||
48 | next entry with a ut_line matching LINE->ut_line. */ | ||
49 | extern struct utmp *getutline (__const struct utmp *__line) __THROW; | ||
50 | +libc_hidden_proto(getutline) | ||
51 | |||
52 | /* Write out entry pointed to by UTMP_PTR into the utmp file. */ | ||
53 | extern struct utmp *pututline (__const struct utmp *__utmp_ptr) __THROW; | ||
54 | +libc_hidden_proto(pututline) | ||
55 | |||
56 | |||
57 | #if 0 /* def __USE_MISC */ | ||
58 | diff --git a/libc/misc/utmp/utent.c b/libc/misc/utmp/utent.c | ||
59 | index a35bb2b..07ca44e 100644 | ||
60 | --- a/libc/misc/utmp/utent.c | ||
61 | +++ b/libc/misc/utmp/utent.c | ||
62 | @@ -19,9 +19,6 @@ | ||
63 | #include <errno.h> | ||
64 | #include <string.h> | ||
65 | #include <utmp.h> | ||
66 | -#ifdef __UCLIBC_HAS_UTMPX__ | ||
67 | -# include <utmpx.h> | ||
68 | -#endif | ||
69 | #include <not-cancel.h> | ||
70 | |||
71 | #include <bits/uClibc_mutex.h> | ||
72 | @@ -34,7 +31,7 @@ static const char default_file_name[] = _PATH_UTMP; | ||
73 | static const char *static_ut_name = default_file_name; | ||
74 | |||
75 | /* This function must be called with the LOCK held */ | ||
76 | -static void __setutent_unlocked(void) | ||
77 | +static void __setutent(void) | ||
78 | { | ||
79 | if (static_fd < 0) { | ||
80 | static_fd = open_not_cancel_2(static_ut_name, O_RDWR | O_CLOEXEC); | ||
81 | @@ -53,24 +50,19 @@ static void __setutent_unlocked(void) | ||
82 | lseek(static_fd, 0, SEEK_SET); | ||
83 | } | ||
84 | #if defined __UCLIBC_HAS_THREADS__ | ||
85 | -static void __setutent(void) | ||
86 | +void setutent(void) | ||
87 | { | ||
88 | __UCLIBC_MUTEX_LOCK(utmplock); | ||
89 | - __setutent_unlocked(); | ||
90 | + __setutent(); | ||
91 | __UCLIBC_MUTEX_UNLOCK(utmplock); | ||
92 | } | ||
93 | #else | ||
94 | -static void __setutent(void); | ||
95 | -strong_alias(__setutent_unlocked,__setutent) | ||
96 | -#endif | ||
97 | strong_alias(__setutent,setutent) | ||
98 | - | ||
99 | -#ifdef __UCLIBC_HAS_UTMPX__ | ||
100 | -strong_alias(__setutent,setutxent) | ||
101 | #endif | ||
102 | +libc_hidden_def(setutent) | ||
103 | |||
104 | /* This function must be called with the LOCK held */ | ||
105 | -static struct utmp *__getutent_unlocked(void) | ||
106 | +static struct utmp *__getutent(void) | ||
107 | { | ||
108 | if (static_fd < 0) { | ||
109 | __setutent(); | ||
110 | @@ -86,27 +78,19 @@ static struct utmp *__getutent_unlocked(void) | ||
111 | return NULL; | ||
112 | } | ||
113 | #if defined __UCLIBC_HAS_THREADS__ | ||
114 | -static struct utmp *__getutent(void) | ||
115 | +struct utmp *getutent(void) | ||
116 | { | ||
117 | struct utmp *ret; | ||
118 | |||
119 | __UCLIBC_MUTEX_LOCK(utmplock); | ||
120 | - ret = __getutent_unlocked(); | ||
121 | + ret = __getutent(); | ||
122 | __UCLIBC_MUTEX_UNLOCK(utmplock); | ||
123 | return ret; | ||
124 | } | ||
125 | #else | ||
126 | -static struct utmp *__getutent(void); | ||
127 | -strong_alias(__getutent_unlocked,__getutent) | ||
128 | -#endif | ||
129 | strong_alias(__getutent,getutent) | ||
130 | - | ||
131 | -#ifdef __UCLIBC_HAS_UTMPX__ | ||
132 | -struct utmpx *getutxent(void) | ||
133 | -{ | ||
134 | - return (struct utmpx *) __getutent (); | ||
135 | -} | ||
136 | #endif | ||
137 | +libc_hidden_def(getutent) | ||
138 | |||
139 | static void __endutent(void) | ||
140 | { | ||
141 | @@ -117,13 +101,10 @@ static void __endutent(void) | ||
142 | __UCLIBC_MUTEX_UNLOCK(utmplock); | ||
143 | } | ||
144 | strong_alias(__endutent,endutent) | ||
145 | - | ||
146 | -#ifdef __UCLIBC_HAS_UTMPX__ | ||
147 | -strong_alias(__endutent,endutxent) | ||
148 | -#endif | ||
149 | +libc_hidden_def(endutent) | ||
150 | |||
151 | /* This function must be called with the LOCK held */ | ||
152 | -static struct utmp *__getutid_unlocked(const struct utmp *utmp_entry) | ||
153 | +static struct utmp *__getutid(const struct utmp *utmp_entry) | ||
154 | { | ||
155 | struct utmp *lutmp; | ||
156 | unsigned type; | ||
157 | @@ -133,7 +114,7 @@ static struct utmp *__getutid_unlocked(const struct utmp *utmp_entry) | ||
158 | type = utmp_entry->ut_type - 1; | ||
159 | type /= 4; | ||
160 | |||
161 | - while ((lutmp = __getutent_unlocked()) != NULL) { | ||
162 | + while ((lutmp = __getutent()) != NULL) { | ||
163 | if (type == 0 && lutmp->ut_type == utmp_entry->ut_type) { | ||
164 | /* one of RUN_LVL, BOOT_TIME, NEW_TIME, OLD_TIME */ | ||
165 | return lutmp; | ||
166 | @@ -147,34 +128,26 @@ static struct utmp *__getutid_unlocked(const struct utmp *utmp_entry) | ||
167 | return NULL; | ||
168 | } | ||
169 | #if defined __UCLIBC_HAS_THREADS__ | ||
170 | -static struct utmp *__getutid(const struct utmp *utmp_entry) | ||
171 | +struct utmp *getutid(const struct utmp *utmp_entry) | ||
172 | { | ||
173 | struct utmp *ret; | ||
174 | |||
175 | __UCLIBC_MUTEX_LOCK(utmplock); | ||
176 | - ret = __getutid_unlocked(utmp_entry); | ||
177 | + ret = __getutid(utmp_entry); | ||
178 | __UCLIBC_MUTEX_UNLOCK(utmplock); | ||
179 | return ret; | ||
180 | } | ||
181 | #else | ||
182 | -static struct utmp *__getutid(const struct utmp *utmp_entry); | ||
183 | -strong_alias(__getutid_unlocked,__getutid) | ||
184 | -#endif | ||
185 | strong_alias(__getutid,getutid) | ||
186 | - | ||
187 | -#ifdef __UCLIBC_HAS_UTMPX__ | ||
188 | -struct utmpx *getutxid(const struct utmpx *utmp_entry) | ||
189 | -{ | ||
190 | - return (struct utmpx *) __getutid ((const struct utmp *) utmp_entry); | ||
191 | -} | ||
192 | #endif | ||
193 | +libc_hidden_def(getutid) | ||
194 | |||
195 | static struct utmp *__getutline(const struct utmp *utmp_entry) | ||
196 | { | ||
197 | struct utmp *lutmp; | ||
198 | |||
199 | __UCLIBC_MUTEX_LOCK(utmplock); | ||
200 | - while ((lutmp = __getutent_unlocked()) != NULL) { | ||
201 | + while ((lutmp = __getutent()) != NULL) { | ||
202 | if (lutmp->ut_type == USER_PROCESS || lutmp->ut_type == LOGIN_PROCESS) { | ||
203 | if (strncmp(lutmp->ut_line, utmp_entry->ut_line, sizeof(lutmp->ut_line)) == 0) { | ||
204 | break; | ||
205 | @@ -185,13 +158,7 @@ static struct utmp *__getutline(const struct utmp *utmp_entry) | ||
206 | return lutmp; | ||
207 | } | ||
208 | strong_alias(__getutline,getutline) | ||
209 | - | ||
210 | -#ifdef __UCLIBC_HAS_UTMPX__ | ||
211 | -struct utmpx *getutxline(const struct utmpx *utmp_entry) | ||
212 | -{ | ||
213 | - return (struct utmpx *) __getutline ((const struct utmp *) utmp_entry); | ||
214 | -} | ||
215 | -#endif | ||
216 | +libc_hidden_def(getutline) | ||
217 | |||
218 | static struct utmp *__pututline(const struct utmp *utmp_entry) | ||
219 | { | ||
220 | @@ -200,7 +167,7 @@ static struct utmp *__pututline(const struct utmp *utmp_entry) | ||
221 | the file pointer where they want it, everything will work out. */ | ||
222 | lseek(static_fd, (off_t) - sizeof(struct utmp), SEEK_CUR); | ||
223 | |||
224 | - if (__getutid_unlocked(utmp_entry) != NULL) | ||
225 | + if (__getutid(utmp_entry) != NULL) | ||
226 | lseek(static_fd, (off_t) - sizeof(struct utmp), SEEK_CUR); | ||
227 | else | ||
228 | lseek(static_fd, (off_t) 0, SEEK_END); | ||
229 | @@ -211,13 +178,7 @@ static struct utmp *__pututline(const struct utmp *utmp_entry) | ||
230 | return (struct utmp *)utmp_entry; | ||
231 | } | ||
232 | strong_alias(__pututline,pututline) | ||
233 | - | ||
234 | -#ifdef __UCLIBC_HAS_UTMPX__ | ||
235 | -struct utmpx *pututxline (const struct utmpx *utmp_entry) | ||
236 | -{ | ||
237 | - return (struct utmpx *) __pututline ((const struct utmp *) utmp_entry); | ||
238 | -} | ||
239 | -#endif | ||
240 | +libc_hidden_def(pututline) | ||
241 | |||
242 | static int __utmpname(const char *new_ut_name) | ||
243 | { | ||
244 | @@ -241,7 +202,4 @@ static int __utmpname(const char *new_ut_name) | ||
245 | return 0; /* or maybe return -(static_ut_name != new_ut_name)? */ | ||
246 | } | ||
247 | strong_alias(__utmpname,utmpname) | ||
248 | - | ||
249 | -#ifdef __UCLIBC_HAS_UTMPX__ | ||
250 | -strong_alias(__utmpname,utmpxname) | ||
251 | -#endif | ||
252 | +libc_hidden_def(utmpname) | ||
253 | diff --git a/libc/misc/utmp/utxent.c b/libc/misc/utmp/utxent.c | ||
254 | index 71157cc..a0e80a6 100644 | ||
255 | --- a/libc/misc/utmp/utxent.c | ||
256 | +++ b/libc/misc/utmp/utxent.c | ||
257 | @@ -13,7 +13,6 @@ | ||
258 | #include <utmpx.h> | ||
259 | #include <utmp.h> | ||
260 | |||
261 | -#if 0 /* moved to utent.c */ | ||
262 | void setutxent(void) | ||
263 | { | ||
264 | setutent (); | ||
265 | @@ -49,12 +48,10 @@ int utmpxname (const char *new_ut_name) | ||
266 | return utmpname (new_ut_name); | ||
267 | } | ||
268 | |||
269 | -/* moved to wtent.c */ | ||
270 | void updwtmpx (const char *wtmpx_file, const struct utmpx *utmpx) | ||
271 | { | ||
272 | updwtmp (wtmpx_file, (const struct utmp *) utmpx); | ||
273 | } | ||
274 | -#endif | ||
275 | |||
276 | /* Copy the information in UTMPX to UTMP. */ | ||
277 | void getutmp (const struct utmpx *utmpx, struct utmp *utmp) | ||
278 | @@ -107,3 +104,4 @@ void getutmpx (const struct utmp *utmp, struct utmpx *utmpx) | ||
279 | utmpx->ut_time = utmp->ut_time; | ||
280 | #endif | ||
281 | } | ||
282 | + | ||
283 | diff --git a/libc/misc/utmp/wtent.c b/libc/misc/utmp/wtent.c | ||
284 | index 9b3ad50..b5e4ee5 100644 | ||
285 | --- a/libc/misc/utmp/wtent.c | ||
286 | +++ b/libc/misc/utmp/wtent.c | ||
287 | @@ -11,9 +11,6 @@ | ||
288 | #include <time.h> | ||
289 | #include <unistd.h> | ||
290 | #include <utmp.h> | ||
291 | -#ifdef __UCLIBC_HAS_UTMPX__ | ||
292 | -# include <utmpx.h> | ||
293 | -#endif | ||
294 | #include <fcntl.h> | ||
295 | #include <sys/file.h> | ||
296 | #include <not-cancel.h> | ||
297 | @@ -36,7 +33,7 @@ void logwtmp (const char *line, const char *name, const char *host) | ||
298 | } | ||
299 | #endif | ||
300 | |||
301 | -static void __updwtmp(const char *wtmp_file, const struct utmp *lutmp) | ||
302 | +void updwtmp(const char *wtmp_file, const struct utmp *lutmp) | ||
303 | { | ||
304 | int fd; | ||
305 | |||
306 | @@ -49,11 +46,4 @@ static void __updwtmp(const char *wtmp_file, const struct utmp *lutmp) | ||
307 | } | ||
308 | } | ||
309 | } | ||
310 | -strong_alias(__updwtmp,updwtmp) | ||
311 | - | ||
312 | -#ifdef __UCLIBC_HAS_UTMPX__ | ||
313 | -void updwtmpx (const char *wtmpx_file, const struct utmpx *utmpx) | ||
314 | -{ | ||
315 | - __updwtmp (wtmpx_file, (const struct utmp *) utmpx); | ||
316 | -} | ||
317 | -#endif | ||
318 | +libc_hidden_def(updwtmp) | ||
319 | -- | ||
320 | 1.7.9.5 | ||
321 | |||