Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/makefs/chfs Fix building tools



details:   https://anonhg.NetBSD.org/src/rev/228af72129f5
branches:  trunk
changeset: 778921:228af72129f5
user:      adam <adam%NetBSD.org@localhost>
date:      Fri Apr 20 13:28:27 2012 +0000

description:
Fix building tools

diffstat:

 usr.sbin/makefs/chfs/Makefile.inc |  2 ++
 usr.sbin/makefs/chfs/chfs_mkfs.c  |  4 ++++
 2 files changed, 6 insertions(+), 0 deletions(-)

diffs (26 lines):

diff -r 702d626f22f6 -r 228af72129f5 usr.sbin/makefs/chfs/Makefile.inc
--- a/usr.sbin/makefs/chfs/Makefile.inc Fri Apr 20 13:20:39 2012 +0000
+++ b/usr.sbin/makefs/chfs/Makefile.inc Fri Apr 20 13:28:27 2012 +0000
@@ -5,5 +5,7 @@
 CPPFLAGS+= -I${CHFS}
 
 SRCS+= chfs_mkfs.c
+.if !defined(HOSTPROG)
 LDADD+= -lz
 DPADD+= ${LIBZ}
+.endif
diff -r 702d626f22f6 -r 228af72129f5 usr.sbin/makefs/chfs/chfs_mkfs.c
--- a/usr.sbin/makefs/chfs/chfs_mkfs.c  Fri Apr 20 13:20:39 2012 +0000
+++ b/usr.sbin/makefs/chfs/chfs_mkfs.c  Fri Apr 20 13:28:27 2012 +0000
@@ -209,7 +209,11 @@
        }
 
        fdirent.version = htole64(version++);
+#ifdef HAVE_STRUCT_STAT_ST_MTIMENSEC
        fdirent.mctime = htole32(node->inode->st.st_mtimensec);
+#else
+       fdirent.mctime = htole32(node->inode->st.st_mtimespec.tv_nsec);
+#endif
        fdirent.nsize = htole32(strlen(name));
        fdirent.dtype = htole32(IFTOCHT(node->type & S_IFMT));
        fdirent.name_crc = htole32(crc32(0, (uint8_t *)name, fdirent.nsize));



Home | Main Index | Thread Index | Old Index