yann@1282: [PATCH]: Add strtouq alias (to strtoul) for 64bit yann@1282: yann@1282: The strtouq alias was only available on 32bit, breaking compilation of stuff yann@1282: using strtouq on 64bit machines. At the same time use the correct return yann@1282: type (u_quad_t). yann@1282: yann@1282: Signed-of-by: Peter Korsgaard yann@1282: --- yann@1282: include/stdlib.h | 4 +++- yann@1282: libc/stdlib/stdlib.c | 1 + yann@1282: 2 files changed, 4 insertions(+), 1 deletion(-) yann@1282: yann@1282: Index: uClibc-0.9.30.1/libc/stdlib/stdlib.c yann@1282: =================================================================== yann@1282: --- uClibc-0.9.30.1.orig/libc/stdlib/stdlib.c yann@1282: +++ uClibc-0.9.30.1/libc/stdlib/stdlib.c yann@1282: @@ -401,6 +401,9 @@ yann@1282: libc_hidden_proto(__XL_NPP(strtoull)) yann@1282: strong_alias(__XL_NPP(strtoul),__XL_NPP(strtoull)) yann@1282: libc_hidden_def(__XL_NPP(strtoull)) yann@1282: +#if !defined(L_strtoul_l) yann@1282: +strong_alias(strtoul,strtouq) yann@1282: +#endif yann@1282: #endif yann@1282: yann@1282: yann@1282: Index: uClibc-0.9.30.1/include/stdlib.h yann@1282: =================================================================== yann@1282: --- uClibc-0.9.30.1.orig/include/stdlib.h yann@1282: +++ uClibc-0.9.30.1/include/stdlib.h yann@1282: @@ -203,6 +203,8 @@ yann@1282: __END_NAMESPACE_STD yann@1282: yann@1282: #ifdef __USE_BSD yann@1282: +#include /* for u_quad_t */ yann@1282: + yann@1282: /* Convert a string to a quadword integer. */ yann@1282: __extension__ yann@1282: extern long long int strtoq (__const char *__restrict __nptr, yann@1282: @@ -210,7 +212,7 @@ yann@1282: __THROW __nonnull ((1)) __wur; yann@1282: /* Convert a string to an unsigned quadword integer. */ yann@1282: __extension__ yann@1282: -extern unsigned long long int strtouq (__const char *__restrict __nptr, yann@1282: +extern u_quad_t strtouq (__const char *__restrict __nptr, yann@1282: char **__restrict __endptr, int __base) yann@1282: __THROW __nonnull ((1)) __wur; yann@1282: #endif /* GCC and use BSD. */