diff options
Diffstat (limited to 'meta/recipes-core/uclibc/uclibc-git/0001-Revert-utent.c-wtent.c-move-functions-from-utxent.c.patch')
-rw-r--r-- | meta/recipes-core/uclibc/uclibc-git/0001-Revert-utent.c-wtent.c-move-functions-from-utxent.c.patch | 78 |
1 files changed, 38 insertions, 40 deletions
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 index 8c202ace47..4ac765c334 100644 --- 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 | |||
@@ -13,18 +13,18 @@ This reverts commit 84135275cfeebc0b233c1c96eeada4d4178a0b18. | |||
13 | libc/misc/utmp/wtent.c | 14 ++------- | 13 | libc/misc/utmp/wtent.c | 14 ++------- |
14 | 4 files changed, 30 insertions(+), 76 deletions(-) | 14 | 4 files changed, 30 insertions(+), 76 deletions(-) |
15 | 15 | ||
16 | diff --git a/include/utmp.h b/include/utmp.h | 16 | Index: git/include/utmp.h |
17 | index cb8e08f..10b75c9 100644 | 17 | =================================================================== |
18 | --- a/include/utmp.h | 18 | --- git.orig/include/utmp.h 2013-01-21 16:37:18.000000000 -0800 |
19 | +++ b/include/utmp.h | 19 | +++ git/include/utmp.h 2013-01-21 16:40:56.987583099 -0800 |
20 | @@ -57,29 +57,37 @@ extern void logwtmp (__const char *__ut_line, __const char *__ut_name, | 20 | @@ -56,30 +56,37 @@ |
21 | /* Append entry UTMP to the wtmp-like file WTMP_FILE. */ | 21 | /* Append entry UTMP to the wtmp-like file WTMP_FILE. */ |
22 | extern void updwtmp (__const char *__wtmp_file, __const struct utmp *__utmp) | 22 | extern void updwtmp (const char *__wtmp_file, const struct utmp *__utmp) |
23 | __THROW; | 23 | __THROW; |
24 | +libc_hidden_proto(updwtmp) | 24 | +libc_hidden_proto(updwtmp) |
25 | 25 | ||
26 | /* Change name of the utmp file to be examined. */ | 26 | /* Change name of the utmp file to be examined. */ |
27 | extern int utmpname (__const char *__file) __THROW; | 27 | extern int utmpname (const char *__file) __THROW; |
28 | +libc_hidden_proto(utmpname) | 28 | +libc_hidden_proto(utmpname) |
29 | 29 | ||
30 | /* Read next entry from a utmp-like file. */ | 30 | /* Read next entry from a utmp-like file. */ |
@@ -41,24 +41,25 @@ index cb8e08f..10b75c9 100644 | |||
41 | 41 | ||
42 | /* Search forward from the current point in the utmp file until the | 42 | /* Search forward from the current point in the utmp file until the |
43 | next entry with a ut_type matching ID->ut_type. */ | 43 | next entry with a ut_type matching ID->ut_type. */ |
44 | extern struct utmp *getutid (__const struct utmp *__id) __THROW; | 44 | extern struct utmp *getutid (const struct utmp *__id) __THROW; |
45 | +libc_hidden_proto(getutid) | 45 | +libc_hidden_proto(getutid) |
46 | 46 | ||
47 | /* Search forward from the current point in the utmp file until the | 47 | /* Search forward from the current point in the utmp file until the |
48 | next entry with a ut_line matching LINE->ut_line. */ | 48 | next entry with a ut_line matching LINE->ut_line. */ |
49 | extern struct utmp *getutline (__const struct utmp *__line) __THROW; | 49 | extern struct utmp *getutline (const struct utmp *__line) __THROW; |
50 | +libc_hidden_proto(getutline) | 50 | +libc_hidden_proto(getutline) |
51 | 51 | ||
52 | /* Write out entry pointed to by UTMP_PTR into the utmp file. */ | 52 | /* Write out entry pointed to by UTMP_PTR into the utmp file. */ |
53 | extern struct utmp *pututline (__const struct utmp *__utmp_ptr) __THROW; | 53 | extern struct utmp *pututline (const struct utmp *__utmp_ptr) __THROW; |
54 | - | ||
54 | +libc_hidden_proto(pututline) | 55 | +libc_hidden_proto(pututline) |
55 | 56 | ||
56 | |||
57 | #if 0 /* def __USE_MISC */ | 57 | #if 0 /* def __USE_MISC */ |
58 | diff --git a/libc/misc/utmp/utent.c b/libc/misc/utmp/utent.c | 58 | /* Reentrant versions of the file for handling utmp files. */ |
59 | index a35bb2b..07ca44e 100644 | 59 | Index: git/libc/misc/utmp/utent.c |
60 | --- a/libc/misc/utmp/utent.c | 60 | =================================================================== |
61 | +++ b/libc/misc/utmp/utent.c | 61 | --- git.orig/libc/misc/utmp/utent.c 2013-01-21 16:37:18.000000000 -0800 |
62 | +++ git/libc/misc/utmp/utent.c 2013-01-21 16:38:14.035578638 -0800 | ||
62 | @@ -19,9 +19,6 @@ | 63 | @@ -19,9 +19,6 @@ |
63 | #include <errno.h> | 64 | #include <errno.h> |
64 | #include <string.h> | 65 | #include <string.h> |
@@ -69,7 +70,7 @@ index a35bb2b..07ca44e 100644 | |||
69 | #include <not-cancel.h> | 70 | #include <not-cancel.h> |
70 | 71 | ||
71 | #include <bits/uClibc_mutex.h> | 72 | #include <bits/uClibc_mutex.h> |
72 | @@ -34,7 +31,7 @@ static const char default_file_name[] = _PATH_UTMP; | 73 | @@ -34,7 +31,7 @@ |
73 | static const char *static_ut_name = default_file_name; | 74 | static const char *static_ut_name = default_file_name; |
74 | 75 | ||
75 | /* This function must be called with the LOCK held */ | 76 | /* This function must be called with the LOCK held */ |
@@ -78,7 +79,7 @@ index a35bb2b..07ca44e 100644 | |||
78 | { | 79 | { |
79 | if (static_fd < 0) { | 80 | if (static_fd < 0) { |
80 | static_fd = open_not_cancel_2(static_ut_name, O_RDWR | O_CLOEXEC); | 81 | static_fd = open_not_cancel_2(static_ut_name, O_RDWR | O_CLOEXEC); |
81 | @@ -53,24 +50,19 @@ static void __setutent_unlocked(void) | 82 | @@ -53,24 +50,19 @@ |
82 | lseek(static_fd, 0, SEEK_SET); | 83 | lseek(static_fd, 0, SEEK_SET); |
83 | } | 84 | } |
84 | #if defined __UCLIBC_HAS_THREADS__ | 85 | #if defined __UCLIBC_HAS_THREADS__ |
@@ -107,7 +108,7 @@ index a35bb2b..07ca44e 100644 | |||
107 | { | 108 | { |
108 | if (static_fd < 0) { | 109 | if (static_fd < 0) { |
109 | __setutent(); | 110 | __setutent(); |
110 | @@ -86,27 +78,19 @@ static struct utmp *__getutent_unlocked(void) | 111 | @@ -86,27 +78,19 @@ |
111 | return NULL; | 112 | return NULL; |
112 | } | 113 | } |
113 | #if defined __UCLIBC_HAS_THREADS__ | 114 | #if defined __UCLIBC_HAS_THREADS__ |
@@ -138,7 +139,7 @@ index a35bb2b..07ca44e 100644 | |||
138 | 139 | ||
139 | static void __endutent(void) | 140 | static void __endutent(void) |
140 | { | 141 | { |
141 | @@ -117,13 +101,10 @@ static void __endutent(void) | 142 | @@ -117,13 +101,10 @@ |
142 | __UCLIBC_MUTEX_UNLOCK(utmplock); | 143 | __UCLIBC_MUTEX_UNLOCK(utmplock); |
143 | } | 144 | } |
144 | strong_alias(__endutent,endutent) | 145 | strong_alias(__endutent,endutent) |
@@ -154,7 +155,7 @@ index a35bb2b..07ca44e 100644 | |||
154 | { | 155 | { |
155 | struct utmp *lutmp; | 156 | struct utmp *lutmp; |
156 | unsigned type; | 157 | unsigned type; |
157 | @@ -133,7 +114,7 @@ static struct utmp *__getutid_unlocked(const struct utmp *utmp_entry) | 158 | @@ -133,7 +114,7 @@ |
158 | type = utmp_entry->ut_type - 1; | 159 | type = utmp_entry->ut_type - 1; |
159 | type /= 4; | 160 | type /= 4; |
160 | 161 | ||
@@ -163,7 +164,7 @@ index a35bb2b..07ca44e 100644 | |||
163 | if (type == 0 && lutmp->ut_type == utmp_entry->ut_type) { | 164 | if (type == 0 && lutmp->ut_type == utmp_entry->ut_type) { |
164 | /* one of RUN_LVL, BOOT_TIME, NEW_TIME, OLD_TIME */ | 165 | /* one of RUN_LVL, BOOT_TIME, NEW_TIME, OLD_TIME */ |
165 | return lutmp; | 166 | return lutmp; |
166 | @@ -147,34 +128,26 @@ static struct utmp *__getutid_unlocked(const struct utmp *utmp_entry) | 167 | @@ -147,34 +128,26 @@ |
167 | return NULL; | 168 | return NULL; |
168 | } | 169 | } |
169 | #if defined __UCLIBC_HAS_THREADS__ | 170 | #if defined __UCLIBC_HAS_THREADS__ |
@@ -202,7 +203,7 @@ index a35bb2b..07ca44e 100644 | |||
202 | if (lutmp->ut_type == USER_PROCESS || lutmp->ut_type == LOGIN_PROCESS) { | 203 | 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 | if (strncmp(lutmp->ut_line, utmp_entry->ut_line, sizeof(lutmp->ut_line)) == 0) { |
204 | break; | 205 | break; |
205 | @@ -185,13 +158,7 @@ static struct utmp *__getutline(const struct utmp *utmp_entry) | 206 | @@ -185,13 +158,7 @@ |
206 | return lutmp; | 207 | return lutmp; |
207 | } | 208 | } |
208 | strong_alias(__getutline,getutline) | 209 | strong_alias(__getutline,getutline) |
@@ -217,7 +218,7 @@ index a35bb2b..07ca44e 100644 | |||
217 | 218 | ||
218 | static struct utmp *__pututline(const struct utmp *utmp_entry) | 219 | static struct utmp *__pututline(const struct utmp *utmp_entry) |
219 | { | 220 | { |
220 | @@ -200,7 +167,7 @@ static struct utmp *__pututline(const struct utmp *utmp_entry) | 221 | @@ -200,7 +167,7 @@ |
221 | the file pointer where they want it, everything will work out. */ | 222 | the file pointer where they want it, everything will work out. */ |
222 | lseek(static_fd, (off_t) - sizeof(struct utmp), SEEK_CUR); | 223 | lseek(static_fd, (off_t) - sizeof(struct utmp), SEEK_CUR); |
223 | 224 | ||
@@ -226,7 +227,7 @@ index a35bb2b..07ca44e 100644 | |||
226 | lseek(static_fd, (off_t) - sizeof(struct utmp), SEEK_CUR); | 227 | lseek(static_fd, (off_t) - sizeof(struct utmp), SEEK_CUR); |
227 | else | 228 | else |
228 | lseek(static_fd, (off_t) 0, SEEK_END); | 229 | lseek(static_fd, (off_t) 0, SEEK_END); |
229 | @@ -211,13 +178,7 @@ static struct utmp *__pututline(const struct utmp *utmp_entry) | 230 | @@ -211,13 +178,7 @@ |
230 | return (struct utmp *)utmp_entry; | 231 | return (struct utmp *)utmp_entry; |
231 | } | 232 | } |
232 | strong_alias(__pututline,pututline) | 233 | strong_alias(__pututline,pututline) |
@@ -241,7 +242,7 @@ index a35bb2b..07ca44e 100644 | |||
241 | 242 | ||
242 | static int __utmpname(const char *new_ut_name) | 243 | static int __utmpname(const char *new_ut_name) |
243 | { | 244 | { |
244 | @@ -241,7 +202,4 @@ static int __utmpname(const char *new_ut_name) | 245 | @@ -241,7 +202,4 @@ |
245 | return 0; /* or maybe return -(static_ut_name != new_ut_name)? */ | 246 | return 0; /* or maybe return -(static_ut_name != new_ut_name)? */ |
246 | } | 247 | } |
247 | strong_alias(__utmpname,utmpname) | 248 | strong_alias(__utmpname,utmpname) |
@@ -250,10 +251,10 @@ index a35bb2b..07ca44e 100644 | |||
250 | -strong_alias(__utmpname,utmpxname) | 251 | -strong_alias(__utmpname,utmpxname) |
251 | -#endif | 252 | -#endif |
252 | +libc_hidden_def(utmpname) | 253 | +libc_hidden_def(utmpname) |
253 | diff --git a/libc/misc/utmp/utxent.c b/libc/misc/utmp/utxent.c | 254 | Index: git/libc/misc/utmp/utxent.c |
254 | index 71157cc..a0e80a6 100644 | 255 | =================================================================== |
255 | --- a/libc/misc/utmp/utxent.c | 256 | --- git.orig/libc/misc/utmp/utxent.c 2013-01-21 16:37:18.000000000 -0800 |
256 | +++ b/libc/misc/utmp/utxent.c | 257 | +++ git/libc/misc/utmp/utxent.c 2013-01-21 16:38:14.035578638 -0800 |
257 | @@ -13,7 +13,6 @@ | 258 | @@ -13,7 +13,6 @@ |
258 | #include <utmpx.h> | 259 | #include <utmpx.h> |
259 | #include <utmp.h> | 260 | #include <utmp.h> |
@@ -262,7 +263,7 @@ index 71157cc..a0e80a6 100644 | |||
262 | void setutxent(void) | 263 | void setutxent(void) |
263 | { | 264 | { |
264 | setutent (); | 265 | setutent (); |
265 | @@ -49,12 +48,10 @@ int utmpxname (const char *new_ut_name) | 266 | @@ -49,12 +48,10 @@ |
266 | return utmpname (new_ut_name); | 267 | return utmpname (new_ut_name); |
267 | } | 268 | } |
268 | 269 | ||
@@ -275,15 +276,15 @@ index 71157cc..a0e80a6 100644 | |||
275 | 276 | ||
276 | /* Copy the information in UTMPX to UTMP. */ | 277 | /* Copy the information in UTMPX to UTMP. */ |
277 | void getutmp (const struct utmpx *utmpx, struct utmp *utmp) | 278 | void getutmp (const struct utmpx *utmpx, struct utmp *utmp) |
278 | @@ -107,3 +104,4 @@ void getutmpx (const struct utmp *utmp, struct utmpx *utmpx) | 279 | @@ -107,3 +104,4 @@ |
279 | utmpx->ut_time = utmp->ut_time; | 280 | utmpx->ut_time = utmp->ut_time; |
280 | #endif | 281 | #endif |
281 | } | 282 | } |
282 | + | 283 | + |
283 | diff --git a/libc/misc/utmp/wtent.c b/libc/misc/utmp/wtent.c | 284 | Index: git/libc/misc/utmp/wtent.c |
284 | index 9b3ad50..b5e4ee5 100644 | 285 | =================================================================== |
285 | --- a/libc/misc/utmp/wtent.c | 286 | --- git.orig/libc/misc/utmp/wtent.c 2013-01-21 16:37:18.000000000 -0800 |
286 | +++ b/libc/misc/utmp/wtent.c | 287 | +++ git/libc/misc/utmp/wtent.c 2013-01-21 16:38:14.035578638 -0800 |
287 | @@ -11,9 +11,6 @@ | 288 | @@ -11,9 +11,6 @@ |
288 | #include <time.h> | 289 | #include <time.h> |
289 | #include <unistd.h> | 290 | #include <unistd.h> |
@@ -294,7 +295,7 @@ index 9b3ad50..b5e4ee5 100644 | |||
294 | #include <fcntl.h> | 295 | #include <fcntl.h> |
295 | #include <sys/file.h> | 296 | #include <sys/file.h> |
296 | #include <not-cancel.h> | 297 | #include <not-cancel.h> |
297 | @@ -36,7 +33,7 @@ void logwtmp (const char *line, const char *name, const char *host) | 298 | @@ -36,7 +33,7 @@ |
298 | } | 299 | } |
299 | #endif | 300 | #endif |
300 | 301 | ||
@@ -303,7 +304,7 @@ index 9b3ad50..b5e4ee5 100644 | |||
303 | { | 304 | { |
304 | int fd; | 305 | int fd; |
305 | 306 | ||
306 | @@ -49,11 +46,4 @@ static void __updwtmp(const char *wtmp_file, const struct utmp *lutmp) | 307 | @@ -49,11 +46,4 @@ |
307 | } | 308 | } |
308 | } | 309 | } |
309 | } | 310 | } |
@@ -316,6 +317,3 @@ index 9b3ad50..b5e4ee5 100644 | |||
316 | -} | 317 | -} |
317 | -#endif | 318 | -#endif |
318 | +libc_hidden_def(updwtmp) | 319 | +libc_hidden_def(updwtmp) |
319 | -- | ||
320 | 1.7.9.5 | ||
321 | |||