aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2015-04-19 23:45:17 +0200
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2015-04-20 15:24:30 +0200
commit7d86384b246434e72533332f7f409a7aa9efeacb (patch)
tree6d33165be02886a6a4d032db6293c247576b4e91
parent61d6ae244af424b2a05468307723f21c8810ab9e (diff)
downloadbusybox-w32-7d86384b246434e72533332f7f409a7aa9efeacb.tar.gz
busybox-w32-7d86384b246434e72533332f7f409a7aa9efeacb.tar.bz2
busybox-w32-7d86384b246434e72533332f7f409a7aa9efeacb.zip
include: Fallback to UTMP unless there is UTMPX support
Fixes compilation against uClibc-0.9.30 for instance Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
-rw-r--r--include/libbb.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/include/libbb.h b/include/libbb.h
index 21da5f100..f0ac1f50d 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 <utmpx.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>