accumulated post-1.4.0 fixes
This commit is contained in:
@@ -7,12 +7,8 @@
|
||||
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include "libbb.h"
|
||||
|
||||
|
||||
|
||||
#if defined(__GLIBC__) && __GLIBC__ < 2
|
||||
int vdprintf(int d, const char *format, va_list ap)
|
||||
{
|
||||
|
@@ -81,13 +81,14 @@ char * xstrndup(const char *s, int n)
|
||||
t = (char*) s;
|
||||
while (m) {
|
||||
if (!*t) break;
|
||||
m--; t++;
|
||||
m--;
|
||||
t++;
|
||||
}
|
||||
n = n - m;
|
||||
n -= m;
|
||||
t = xmalloc(n + 1);
|
||||
t[n] = '\0';
|
||||
|
||||
return memcpy(t,s,n);
|
||||
return memcpy(t, s, n);
|
||||
}
|
||||
|
||||
// Die if we can't open a file and return a FILE * to it.
|
||||
|
@@ -36,7 +36,7 @@ char *xreadlink(const char *path)
|
||||
|
||||
char *xmalloc_realpath(const char *path)
|
||||
{
|
||||
#ifdef __GLIBC__
|
||||
#if defined(__GLIBC__) && !defined(__UCLIBC__)
|
||||
/* glibc provides a non-standard extension */
|
||||
return realpath(path, NULL);
|
||||
#else
|
||||
|
Reference in New Issue
Block a user