From 1ec3208935bdfa4bb7f7a4208845da99ceaa886f Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Thu, 14 Feb 2008 14:57:07 +0000 Subject: [PATCH] Fixed busybox 1.9.1's umount to compile against dietlibc, which doesn't include getmntent_r() --- base/busybox/dietlibc.patch | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/base/busybox/dietlibc.patch b/base/busybox/dietlibc.patch index 0b6761642..c8bbd8745 100644 --- a/base/busybox/dietlibc.patch +++ b/base/busybox/dietlibc.patch @@ -2,7 +2,7 @@ # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # Filename: package/.../busybox/dietlibc.patch -# Copyright (C) 2007 The OpenSDE Project +# Copyright (C) 2007 - 2008 The OpenSDE Project # # More information can be found in the files COPYING and README. # @@ -37,3 +37,23 @@ char *pw_encrypt(const char *clear, const char *salt) { +--- ./util-linux/umount.c.orig 2008-02-14 14:44:01.000000000 +0000 ++++ ./util-linux/umount.c 2008-02-14 14:44:29.000000000 +0000 +@@ -21,6 +21,17 @@ + #define OPT_REMOUNT (1 << 4) + #define OPT_ALL (ENABLE_FEATURE_UMOUNT_ALL ? (1 << 5) : 0) + ++#if defined(__dietlibc__) ++/* 16.12.2006, Sampo Kellomaki (sampo@iki.fi) ++ * dietlibc-0.30 does not have implementation of getmntent_r() */ ++static struct mntent *getmntent_r(FILE* stream, struct mntent* result, char* buffer, int bufsize) ++{ ++ struct mntent* ment = getmntent(stream); ++ memcpy(result, ment, sizeof(struct mntent)); ++ return result; ++} ++#endif ++ + int umount_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; + int umount_main(int argc, char **argv) + {