aboutsummaryrefslogtreecommitdiff
path: root/utility.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2000-07-10 23:39:44 +0000
committerEric Andersen <andersen@codepoet.org>2000-07-10 23:39:44 +0000
commitda1d1e763d5f4dbdc2c5afd7d5034ed979a15d71 (patch)
treef1a3b22ce19c5b6c1599baa6afa89712b1230d53 /utility.c
parentcc54d12ef716e9206344c18006b46386fe49ba9b (diff)
downloadbusybox-w32-da1d1e763d5f4dbdc2c5afd7d5034ed979a15d71.tar.gz
busybox-w32-da1d1e763d5f4dbdc2c5afd7d5034ed979a15d71.tar.bz2
busybox-w32-da1d1e763d5f4dbdc2c5afd7d5034ed979a15d71.zip
Fixed NFS so it supports 2.4.x kernels and NFSv3. Should close bug #1009.
-Erik
Diffstat (limited to '')
-rw-r--r--utility.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/utility.c b/utility.c
index ef52ce2f7..46907e46a 100644
--- a/utility.c
+++ b/utility.c
@@ -1456,6 +1456,36 @@ extern void *xmalloc(size_t size)
1456 return cp; 1456 return cp;
1457} 1457}
1458 1458
1459#if defined BB_FEATURE_NFSMOUNT
1460extern char * xstrdup (const char *s) {
1461 char *t;
1462
1463 if (s == NULL)
1464 return NULL;
1465
1466 t = strdup (s);
1467
1468 if (t == NULL)
1469 fatalError(memory_exhausted, "");
1470
1471 return t;
1472}
1473
1474extern char * xstrndup (const char *s, int n) {
1475 char *t;
1476
1477 if (s == NULL)
1478 fatalError("xstrndup bug");
1479
1480 t = xmalloc(n+1);
1481 strncpy(t,s,n);
1482 t[n] = 0;
1483
1484 return t;
1485}
1486#endif
1487
1488
1459#if (__GLIBC__ < 2) && (defined BB_SYSLOGD || defined BB_INIT) 1489#if (__GLIBC__ < 2) && (defined BB_SYSLOGD || defined BB_INIT)
1460extern int vdprintf(int d, const char *format, va_list ap) 1490extern int vdprintf(int d, const char *format, va_list ap)
1461{ 1491{