Module Name: src
Committed By: mbalmer
Date: Wed Feb 8 12:10:17 UTC 2012
Modified Files:
src/lib/libc/compat/gen: compat_readdir.c
Log Message:
Add missing cast, fixes i386 build. releng ok.
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/compat/gen/compat_readdir.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libc/compat/gen/compat_readdir.c
diff -u src/lib/libc/compat/gen/compat_readdir.c:1.2 src/lib/libc/compat/gen/compat_readdir.c:1.3
--- src/lib/libc/compat/gen/compat_readdir.c:1.2 Wed Feb 8 03:24:30 2012
+++ src/lib/libc/compat/gen/compat_readdir.c Wed Feb 8 12:10:17 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: compat_readdir.c,v 1.2 2012/02/08 03:24:30 christos Exp $ */
+/* $NetBSD: compat_readdir.c,v 1.3 2012/02/08 12:10:17 mbalmer Exp $ */
#define __LIBC12_SOURCE__
#include "namespace.h"
@@ -35,7 +35,7 @@ direnttodirent12(struct dirent12 *d12, c
d12->d_reclen = (uint16_t)d->d_reclen;
d12->d_namlen = (uint8_t)MIN(d->d_namlen, sizeof(d->d_name) - 1);
d12->d_type = (uint8_t)d->d_type;
- memcpy(d12->d_name, d->d_name, d12->d_namlen);
+ memcpy(d12->d_name, d->d_name, (size_t)d12->d_namlen);
d12->d_name[d12->d_namlen] = '\0';
return d12;
}