Module Name: src
Committed By: dsl
Date: Thu Jan 3 13:28:41 UTC 2013
Modified Files:
src/usr.bin/stat: stat.c
Log Message:
Unset HAVE_DEVNAME for tools build.
config only checks for the symbol in libc, we need the correct prototype.
Which is excluded even on NetBSD (_NETBSD_SOURCE isn't defined in stdlib.h).
To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/usr.bin/stat/stat.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/stat/stat.c
diff -u src/usr.bin/stat/stat.c:1.37 src/usr.bin/stat/stat.c:1.38
--- src/usr.bin/stat/stat.c:1.37 Sun Dec 2 21:13:07 2012
+++ src/usr.bin/stat/stat.c Thu Jan 3 13:28:41 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: stat.c,v 1.37 2012/12/02 21:13:07 erh Exp $ */
+/* $NetBSD: stat.c,v 1.38 2013/01/03 13:28:41 dsl Exp $ */
/*
* Copyright (c) 2002-2011 The NetBSD Foundation, Inc.
@@ -31,11 +31,13 @@
#if HAVE_NBTOOL_CONFIG_H
#include "nbtool_config.h"
+/* config checked libc, we need the prototype as well */
+#undef HAVE_DEVNAME
#endif
#include <sys/cdefs.h>
#if !defined(lint)
-__RCSID("$NetBSD: stat.c,v 1.37 2012/12/02 21:13:07 erh Exp $");
+__RCSID("$NetBSD: stat.c,v 1.38 2013/01/03 13:28:41 dsl Exp $");
#endif
#if ! HAVE_NBTOOL_CONFIG_H
@@ -607,9 +609,9 @@ format1(const struct stat *st,
sdata = (what == SHOW_st_dev) ?
devname(st->st_dev, S_IFBLK) :
devname(st->st_rdev,
- S_ISCHR(st->st_mode) ? S_IFCHR :
- S_ISBLK(st->st_mode) ? S_IFBLK :
- 0U);
+ S_ISCHR(st->st_mode) ? S_IFCHR :
+ S_ISBLK(st->st_mode) ? S_IFBLK :
+ 0U);
if (sdata == NULL)
sdata = "???";
#endif /* HAVE_DEVNAME */