Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/makefs/msdos Allow this to compile on 32bit archite...
details: https://anonhg.NetBSD.org/src/rev/78f5116114c4
branches: trunk
changeset: 784379:78f5116114c4
user: mbalmer <mbalmer%NetBSD.org@localhost>
date: Sun Jan 27 10:07:23 2013 +0000
description:
Allow this to compile on 32bit architectures.
diffstat:
usr.sbin/makefs/msdos/msdosfs_vnops.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r e28bf0f06369 -r 78f5116114c4 usr.sbin/makefs/msdos/msdosfs_vnops.c
--- a/usr.sbin/makefs/msdos/msdosfs_vnops.c Sun Jan 27 05:53:21 2013 +0000
+++ b/usr.sbin/makefs/msdos/msdosfs_vnops.c Sun Jan 27 10:07:23 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: msdosfs_vnops.c,v 1.4 2013/01/26 16:58:14 christos Exp $ */
+/* $NetBSD: msdosfs_vnops.c,v 1.5 2013/01/27 10:07:23 mbalmer Exp $ */
/*-
* Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
@@ -51,7 +51,7 @@
#endif
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: msdosfs_vnops.c,v 1.4 2013/01/26 16:58:14 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: msdosfs_vnops.c,v 1.5 2013/01/27 10:07:23 mbalmer Exp $");
#include <sys/param.h>
#include <sys/mman.h>
@@ -177,7 +177,7 @@
int error, fd;
size_t osize = dep->de_FileSize;
struct stat *st = &node->inode->st;
- size_t nsize = st->st_size;
+ off_t nsize = st->st_size;
size_t offs = 0;
struct msdosfsmount *pmp = dep->de_pmp;
struct buf *bp;
@@ -207,7 +207,7 @@
if ((fd = open(path, O_RDONLY)) == -1)
err(1, "open %s", path);
- if ((dat = mmap(0, nsize, PROT_READ, MAP_FILE | MAP_PRIVATE, fd, 0))
+ if ((dat = mmap(0, (size_t)nsize, PROT_READ, MAP_FILE | MAP_PRIVATE, fd, 0))
== MAP_FAILED)
err(1, "mmap %s", node->name);
close(fd);
Home |
Main Index |
Thread Index |
Old Index