aboutsummaryrefslogtreecommitdiff
path: root/utility.c
diff options
context:
space:
mode:
authorandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2000-07-10 23:39:44 +0000
committerandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2000-07-10 23:39:44 +0000
commitca03aa0069bbc1f5f9a610ba8a46a2fbd6769e58 (patch)
treef1a3b22ce19c5b6c1599baa6afa89712b1230d53 /utility.c
parent4dbd129b2ac9c01473e1214a4693c21d1e08878d (diff)
downloadbusybox-w32-ca03aa0069bbc1f5f9a610ba8a46a2fbd6769e58.tar.gz
busybox-w32-ca03aa0069bbc1f5f9a610ba8a46a2fbd6769e58.tar.bz2
busybox-w32-ca03aa0069bbc1f5f9a610ba8a46a2fbd6769e58.zip
Fixed NFS so it supports 2.4.x kernels and NFSv3. Should close bug #1009.
-Erik git-svn-id: svn://busybox.net/trunk/busybox@810 69ca8d6d-28ef-0310-b511-8ec308f3f277
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{