diff options
author | Matt Whitlock <busybox@mattwhitlock.name> | 2015-04-25 21:32:48 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2015-04-25 21:32:48 +0200 |
commit | cee59053dcf47b4a3ab87f7654c1ed20620def16 (patch) | |
tree | d14818d1f81743b8849f84aa8c2fc4f01fa13e20 /include | |
parent | de5edadee2dca2896492f97ab3a56e389305e74d (diff) | |
download | busybox-w32-cee59053dcf47b4a3ab87f7654c1ed20620def16.tar.gz busybox-w32-cee59053dcf47b4a3ab87f7654c1ed20620def16.tar.bz2 busybox-w32-cee59053dcf47b4a3ab87f7654c1ed20620def16.zip |
Bionic lacks ttyname_r; provide a workaround
Signed-off-by: Matt Whitlock <busybox@mattwhitlock.name>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/platform.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/platform.h b/include/platform.h index df9594507..d5ab7bc29 100644 --- a/include/platform.h +++ b/include/platform.h | |||
@@ -368,6 +368,7 @@ typedef unsigned smalluint; | |||
368 | #define HAVE_DPRINTF 1 | 368 | #define HAVE_DPRINTF 1 |
369 | #define HAVE_MEMRCHR 1 | 369 | #define HAVE_MEMRCHR 1 |
370 | #define HAVE_MKDTEMP 1 | 370 | #define HAVE_MKDTEMP 1 |
371 | #define HAVE_TTYNAME_R 1 | ||
371 | #define HAVE_PTSNAME_R 1 | 372 | #define HAVE_PTSNAME_R 1 |
372 | #define HAVE_SETBIT 1 | 373 | #define HAVE_SETBIT 1 |
373 | #define HAVE_SIGHANDLER_T 1 | 374 | #define HAVE_SIGHANDLER_T 1 |
@@ -480,6 +481,7 @@ typedef unsigned smalluint; | |||
480 | 481 | ||
481 | #if defined(ANDROID) || defined(__ANDROID__) | 482 | #if defined(ANDROID) || defined(__ANDROID__) |
482 | # undef HAVE_DPRINTF | 483 | # undef HAVE_DPRINTF |
484 | # undef HAVE_TTYNAME_R | ||
483 | # undef HAVE_GETLINE | 485 | # undef HAVE_GETLINE |
484 | # undef HAVE_STPCPY | 486 | # undef HAVE_STPCPY |
485 | # undef HAVE_STRCHRNUL | 487 | # undef HAVE_STRCHRNUL |
@@ -505,6 +507,11 @@ extern void *memrchr(const void *s, int c, size_t n) FAST_FUNC; | |||
505 | extern char *mkdtemp(char *template) FAST_FUNC; | 507 | extern char *mkdtemp(char *template) FAST_FUNC; |
506 | #endif | 508 | #endif |
507 | 509 | ||
510 | #ifndef HAVE_TTYNAME_R | ||
511 | #define ttyname_r bb_ttyname_r | ||
512 | extern int ttyname_r(int fd, char *buf, size_t buflen); | ||
513 | #endif | ||
514 | |||
508 | #ifndef HAVE_SETBIT | 515 | #ifndef HAVE_SETBIT |
509 | # define setbit(a, b) ((a)[(b) >> 3] |= 1 << ((b) & 7)) | 516 | # define setbit(a, b) ((a)[(b) >> 3] |= 1 << ((b) & 7)) |
510 | # define clrbit(a, b) ((a)[(b) >> 3] &= ~(1 << ((b) & 7))) | 517 | # define clrbit(a, b) ((a)[(b) >> 3] &= ~(1 << ((b) & 7))) |