Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/powerpc/stand/mkbootimage Fix tools build on !NetBS...



details:   https://anonhg.NetBSD.org/src/rev/9e4ea89c66f1
branches:  trunk
changeset: 761418:9e4ea89c66f1
user:      joerg <joerg%NetBSD.org@localhost>
date:      Wed Jan 26 21:35:14 2011 +0000

description:
Fix tools build on !NetBSD. Fix printfs to use correct types.

diffstat:

 sys/arch/powerpc/stand/mkbootimage/Makefile      |  6 +++---
 sys/arch/powerpc/stand/mkbootimage/mkbootimage.c |  8 ++++----
 2 files changed, 7 insertions(+), 7 deletions(-)

diffs (51 lines):

diff -r 011eb7d320e1 -r 9e4ea89c66f1 sys/arch/powerpc/stand/mkbootimage/Makefile
--- a/sys/arch/powerpc/stand/mkbootimage/Makefile       Wed Jan 26 20:59:48 2011 +0000
+++ b/sys/arch/powerpc/stand/mkbootimage/Makefile       Wed Jan 26 21:35:14 2011 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.3 2009/11/07 17:56:14 skrll Exp $
+#      $NetBSD: Makefile,v 1.4 2011/01/26 21:35:14 joerg Exp $
 
 BINDIR=        /usr/mdec
 PROG=  mkbootimage
@@ -15,7 +15,7 @@
 
 CPPFLAGS= -I${LIBSA} -I${.CURDIR} -I${BFDTOP}/include
 CPPFLAGS+=     -DATTRIBUTE_PACKED=
-DPADD= ${LIBZ}
-LDADD= -lz
+DPADD+=        ${LIBZ}
+LDADD+=        -lz
 
 .include <bsd.prog.mk>
diff -r 011eb7d320e1 -r 9e4ea89c66f1 sys/arch/powerpc/stand/mkbootimage/mkbootimage.c
--- a/sys/arch/powerpc/stand/mkbootimage/mkbootimage.c  Wed Jan 26 20:59:48 2011 +0000
+++ b/sys/arch/powerpc/stand/mkbootimage/mkbootimage.c  Wed Jan 26 21:35:14 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mkbootimage.c,v 1.13 2010/10/16 05:14:14 kiyohara Exp $        */
+/*     $NetBSD: mkbootimage.c,v 1.14 2011/01/26 21:35:14 joerg Exp $   */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -527,19 +527,19 @@
        write(rs6000_fd, (void *)rs6000_magic, RS6000_MAGICSIZE);
        lenpos = lseek(rs6000_fd, 0, SEEK_CUR);
        if (verboseflag)
-               printf("wrote magic at pos 0x%x\n", lenpos);
+               printf("wrote magic at pos 0x%lx\n", (unsigned long)lenpos);
        tmp = sa_htobe32(0);
        write(rs6000_fd, (void *)&tmp, KERNLENSIZE);
 
        /* write in the compressed kernel */
        kstart = lseek(rs6000_fd, 0, SEEK_CUR);
        if (verboseflag)
-               printf("kernel start at pos 0x%x\n", kstart);
+               printf("kernel start at pos 0x%lx\n", (unsigned long)kstart);
        kgzlen = gzwrite(gzf, kern_img, kern_stat.st_size);
        gzclose(gzf);
        kend = lseek(rs6000_fd, 0, SEEK_CUR);
        if (verboseflag)
-               printf("kernel end at pos 0x%x\n", kend);
+               printf("kernel end at pos 0x%lx\n", (unsigned long)kend);
 
        /* jump back to the length position now that we know the length */
        lseek(rs6000_fd, lenpos, SEEK_SET);



Home | Main Index | Thread Index | Old Index