diff options
author | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2000-07-10 23:39:44 +0000 |
---|---|---|
committer | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2000-07-10 23:39:44 +0000 |
commit | ca03aa0069bbc1f5f9a610ba8a46a2fbd6769e58 (patch) | |
tree | f1a3b22ce19c5b6c1599baa6afa89712b1230d53 /utility.c | |
parent | 4dbd129b2ac9c01473e1214a4693c21d1e08878d (diff) | |
download | busybox-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.c | 30 |
1 files changed, 30 insertions, 0 deletions
@@ -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 | ||
1460 | extern 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 | |||
1474 | extern 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) |
1460 | extern int vdprintf(int d, const char *format, va_list ap) | 1490 | extern int vdprintf(int d, const char *format, va_list ap) |
1461 | { | 1491 | { |