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).
This commit is contained in:
parent
f1ca281eda
commit
44483cabc1
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user