Subject: Compiling utoppya failed on amd64
To: None <current-users@netbsd.org>
From: Kurt Schreiner <ks@ub.uni-mainz.de>
List: current-users
Date: 04/03/2006 15:15:54
Hi,
the subject says it all:
compile utoppya/utoppya.o
/u/NetBSD/src/usr.bin/utoppya/utoppya.c: In function `cmd_df':
/u/NetBSD/src/usr.bin/utoppya/utoppya.c:190: warning: long long int format, __uint64_t arg (arg 2)
/u/NetBSD/src/usr.bin/utoppya/utoppya.c:191: warning: long long int format, __uint64_t arg (arg 2)
/u/NetBSD/src/usr.bin/utoppya/utoppya.c: In function `cmd_ls':
/u/NetBSD/src/usr.bin/utoppya/utoppya.c:240: warning: long long int format, __off_t arg (arg 4)
--- utoppya.o ---
*** [utoppya.o] Error code 1
Changing "ll" to "lu" fixed the compile for me:
--- /u/NetBSD/src/usr.bin/utoppya/utoppya.c 2006-04-03 10:15:48.000000000 +0200
+++ /u/NetBSD/lsrc/usr.bin/utoppya/utoppya.c 2006-04-03 15:09:58.000000000 +0200
@@ -187,8 +187,8 @@
if (ioctl(toppy_fd, UTOPPYIOSTATS, &us) < 0)
err(EX_OSERR, "ioctl(UTOPPYIOSTATS)");
- printf("Hard Disk Size: %lld MB\n", us.us_hdd_size / (1024 * 1024));
- printf("Hard Disk Free: %lld MB\n", us.us_hdd_free / (1024 * 1024));
+ printf("Hard Disk Size: %lu MB\n", us.us_hdd_size / (1024 * 1024));
+ printf("Hard Disk Free: %lu MB\n", us.us_hdd_free / (1024 * 1024));
}
static void
@@ -236,7 +236,7 @@
tm = localtime(&ud.ud_mtime);
strftime(tmbuf, sizeof(tmbuf), "%b %e %G %R", tm);
- printf("%crw%c %11lld %s %s\n", ft, ex, ud.ud_size, tmbuf,
+ printf("%crw%c %11lu %s %s\n", ft, ex, ud.ud_size, tmbuf,
ud.ud_path);
}
Kurt