lobase

Linux port of OpenBSDs userland.
Log | Files | Refs | README

commit f775ceff014b779684d44542b467436b42106424
parent f186a9030f522216363c7bfb93cbc8ac205a1bf3
Author: Duncaen <mail@duncano.de>
Date:   Mon,  6 Mar 2017 23:30:50 +0100

usr.bin/stat: fix implicit functions warnings

Diffstat:
usr.bin/stat/Makefile | 1-
usr.bin/stat/stat.c | 9++++++++-
2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/usr.bin/stat/Makefile b/usr.bin/stat/Makefile @@ -2,6 +2,5 @@ # $NetBSD: Makefile,v 1.7 2003/07/25 03:21:17 atatat Exp $ PROG= stat -CPPFLAGS+=-D_XOPEN_SOURCE -D_GNU_SOURCE include bsd.prog.mk diff --git a/usr.bin/stat/stat.c b/usr.bin/stat/stat.c @@ -30,7 +30,14 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#define _GNU_SOURCE +#if defined(__linux__) +# if !defined(_GNU_SOURCE) +# define _GNU_SOURCE +# endif +# if !defined(_XOPEN_SOURCE) +# define _XOPEN_SOURCE +# endif +#endif #include <sys/types.h> #include <sys/stat.h>