diff options
| author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-05-26 01:19:53 +0000 |
|---|---|---|
| committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-05-26 01:19:53 +0000 |
| commit | a0e17f7df6d4c65ecab7339e9899b294ff8bc04e (patch) | |
| tree | 6a78ba6cbfadf1eed88d81c2323138bdddb7da70 | |
| parent | b267ed95bc8141dbf14b276d4aef0fb8e2f5dda7 (diff) | |
| download | busybox-w32-a0e17f7df6d4c65ecab7339e9899b294ff8bc04e.tar.gz busybox-w32-a0e17f7df6d4c65ecab7339e9899b294ff8bc04e.tar.bz2 busybox-w32-a0e17f7df6d4c65ecab7339e9899b294ff8bc04e.zip | |
[u]mount: add/update dietlibc build fix
| -rw-r--r-- | util-linux/mount.c | 6 | ||||
| -rw-r--r-- | util-linux/umount.c | 11 |
2 files changed, 14 insertions, 3 deletions
diff --git a/util-linux/mount.c b/util-linux/mount.c index 3cfbc5600..2efa77644 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c | |||
| @@ -46,11 +46,11 @@ | |||
| 46 | #if defined(__dietlibc__) | 46 | #if defined(__dietlibc__) |
| 47 | /* 16.12.2006, Sampo Kellomaki (sampo@iki.fi) | 47 | /* 16.12.2006, Sampo Kellomaki (sampo@iki.fi) |
| 48 | * dietlibc-0.30 does not have implementation of getmntent_r() */ | 48 | * dietlibc-0.30 does not have implementation of getmntent_r() */ |
| 49 | static struct mntent *getmntent_r(FILE* stream, struct mntent* result, char* buffer, int bufsize) | 49 | static struct mntent *getmntent_r(FILE* stream, struct mntent* result, |
| 50 | char* buffer ATTRIBUTE_UNUSED, int bufsize ATTRIBUTE_UNUSED) | ||
| 50 | { | 51 | { |
| 51 | struct mntent* ment = getmntent(stream); | 52 | struct mntent* ment = getmntent(stream); |
| 52 | memcpy(result, ment, sizeof(struct mntent)); | 53 | return memcpy(result, ment, sizeof(*ment)); |
| 53 | return result; | ||
| 54 | } | 54 | } |
| 55 | #endif | 55 | #endif |
| 56 | 56 | ||
diff --git a/util-linux/umount.c b/util-linux/umount.c index 34c979e0c..9fa3cd2d3 100644 --- a/util-linux/umount.c +++ b/util-linux/umount.c | |||
| @@ -11,6 +11,17 @@ | |||
| 11 | #include <mntent.h> | 11 | #include <mntent.h> |
| 12 | #include "libbb.h" | 12 | #include "libbb.h" |
| 13 | 13 | ||
| 14 | #if defined(__dietlibc__) | ||
| 15 | /* 16.12.2006, Sampo Kellomaki (sampo@iki.fi) | ||
| 16 | * dietlibc-0.30 does not have implementation of getmntent_r() */ | ||
| 17 | static struct mntent *getmntent_r(FILE* stream, struct mntent* result, | ||
| 18 | char* buffer ATTRIBUTE_UNUSED, int bufsize ATTRIBUTE_UNUSED) | ||
| 19 | { | ||
| 20 | struct mntent* ment = getmntent(stream); | ||
| 21 | return memcpy(result, ment, sizeof(*ment)); | ||
| 22 | } | ||
| 23 | #endif | ||
| 24 | |||
| 14 | /* ignored: -v -d -t -i */ | 25 | /* ignored: -v -d -t -i */ |
| 15 | #define OPTION_STRING "fldnra" "vdt:i" | 26 | #define OPTION_STRING "fldnra" "vdt:i" |
| 16 | #define OPT_FORCE (1 << 0) | 27 | #define OPT_FORCE (1 << 0) |
