diff options
Diffstat (limited to 'include/libbb.h')
| -rw-r--r-- | include/libbb.h | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/include/libbb.h b/include/libbb.h index 28ac779c3..2ac95835a 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
| @@ -84,7 +84,30 @@ | |||
| 84 | # include <selinux/av_permissions.h> | 84 | # include <selinux/av_permissions.h> |
| 85 | #endif | 85 | #endif |
| 86 | #if ENABLE_FEATURE_UTMP | 86 | #if ENABLE_FEATURE_UTMP |
| 87 | # include <utmp.h> | 87 | # if defined __UCLIBC__ && ( \ |
| 88 | (UCLIBC_VERSION >= KERNEL_VERSION(0, 9, 32) \ | ||
| 89 | && UCLIBC_VERSION < KERNEL_VERSION(0, 9, 34) \ | ||
| 90 | && defined __UCLIBC_HAS_UTMPX__ \ | ||
| 91 | ) || ( \ | ||
| 92 | UCLIBC_VERSION >= KERNEL_VERSION(0, 9, 34) \ | ||
| 93 | ) \ | ||
| 94 | ) | ||
| 95 | # include <utmpx.h> | ||
| 96 | # elif defined __UCLIBC__ | ||
| 97 | # include <utmp.h> | ||
| 98 | # define utmpx utmp | ||
| 99 | # define setutxent setutent | ||
| 100 | # define endutxent endutent | ||
| 101 | # define getutxent getutent | ||
| 102 | # define getutxid getutid | ||
| 103 | # define getutxline getutline | ||
| 104 | # define pututxline pututline | ||
| 105 | # define utmpxname utmpname | ||
| 106 | # define updwtmpx updwtmp | ||
| 107 | # define _PATH_UTMPX _PATH_UTMP | ||
| 108 | # else | ||
| 109 | # include <utmpx.h> | ||
| 110 | # endif | ||
| 88 | #endif | 111 | #endif |
| 89 | #if ENABLE_LOCALE_SUPPORT | 112 | #if ENABLE_LOCALE_SUPPORT |
| 90 | # include <locale.h> | 113 | # include <locale.h> |
| @@ -726,7 +749,7 @@ void* xrealloc_vector_helper(void *vector, unsigned sizeof_and_shift, int idx) F | |||
| 726 | 749 | ||
| 727 | 750 | ||
| 728 | extern ssize_t safe_read(int fd, void *buf, size_t count) FAST_FUNC; | 751 | extern ssize_t safe_read(int fd, void *buf, size_t count) FAST_FUNC; |
| 729 | extern ssize_t nonblock_immune_read(int fd, void *buf, size_t count, int loop_on_EINTR) FAST_FUNC; | 752 | extern ssize_t nonblock_immune_read(int fd, void *buf, size_t count) FAST_FUNC; |
| 730 | // NB: will return short read on error, not -1, | 753 | // NB: will return short read on error, not -1, |
| 731 | // if some data was read before error occurred | 754 | // if some data was read before error occurred |
| 732 | extern ssize_t full_read(int fd, void *buf, size_t count) FAST_FUNC; | 755 | extern ssize_t full_read(int fd, void *buf, size_t count) FAST_FUNC; |
