use "glibc errno" trick not only for ash, but for entire busybox
(add/remove: 1/1 grow/shrink: 37/37 up/down: 139/-228) Total: -89 bytes
This commit is contained in:
@ -165,6 +165,14 @@
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__GLIBC__)
|
||||
/* glibc uses __errno_location() to get a ptr to errno */
|
||||
/* We can just memorize it once - no multithreading in busybox :) */
|
||||
extern int *const bb_errno;
|
||||
#undef errno
|
||||
#define errno (*bb_errno)
|
||||
#endif
|
||||
|
||||
#if defined(__GLIBC__) && __GLIBC__ < 2
|
||||
int vdprintf(int d, const char *format, va_list ap);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user