svn commit: trunk/busybox/util-linux

Bernhard Fischer rep.dot.nop at gmail.com
Mon May 26 13:55:07 PDT 2008


On Sun, May 25, 2008 at 06:19:55PM -0700, vda at busybox.net wrote:
>Author: vda
>Date: 2008-05-25 18:19:53 -0700 (Sun, 25 May 2008)
>New Revision: 22078
>
>Log:
>[u]mount: add/update dietlibc build fix
>
>
>
>Modified:
>   trunk/busybox/util-linux/mount.c
>   trunk/busybox/util-linux/umount.c
>
>
>Changeset:
>Modified: trunk/busybox/util-linux/mount.c
>===================================================================
>--- trunk/busybox/util-linux/mount.c	2008-05-25 21:52:03 UTC (rev 22077)
>+++ trunk/busybox/util-linux/mount.c	2008-05-26 01:19:53 UTC (rev 22078)
>@@ -46,11 +46,11 @@
> #if defined(__dietlibc__)
> /* 16.12.2006, Sampo Kellomaki (sampo at 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)
>+static struct mntent *getmntent_r(FILE* stream, struct mntent* result,
>+		char* buffer ATTRIBUTE_UNUSED, int bufsize ATTRIBUTE_UNUSED)
> {
> 	struct mntent* ment = getmntent(stream);
>-	memcpy(result, ment, sizeof(struct mntent));
>-	return result;
>+	return memcpy(result, ment, sizeof(*ment));
> }
> #endif
> 
>
>Modified: trunk/busybox/util-linux/umount.c
>===================================================================
>--- trunk/busybox/util-linux/umount.c	2008-05-25 21:52:03 UTC (rev 22077)
>+++ trunk/busybox/util-linux/umount.c	2008-05-26 01:19:53 UTC (rev 22078)
>@@ -11,6 +11,17 @@
> #include <mntent.h>
> #include "libbb.h"
> 
>+#if defined(__dietlibc__)
>+/* 16.12.2006, Sampo Kellomaki (sampo at iki.fi)
>+ * dietlibc-0.30 does not have implementation of getmntent_r() */
>+static struct mntent *getmntent_r(FILE* stream, struct mntent* result,
>+		char* buffer ATTRIBUTE_UNUSED, int bufsize ATTRIBUTE_UNUSED)
>+{
>+	struct mntent* ment = getmntent(stream);
>+	return memcpy(result, ment, sizeof(*ment));
>+}
>+#endif

hum. So why doesn't this live in libbb/getmntent.c ?
Just curious..


More information about the busybox mailing list