From 0e52a6be256e1e54b5e686429cbce7b4625dc3c4 Mon Sep 17 00:00:00 2001 From: guy Date: Wed, 27 Jun 2001 05:42:04 +0000 Subject: Declare "snprintf()" if we are pulling in our own "snprintf()", so that we don't get compiler warnings about it being undeclared. --- machdep.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'machdep.c') diff --git a/machdep.c b/machdep.c index 8c7c4a5b..1bc141de 100644 --- a/machdep.c +++ b/machdep.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/machdep.c,v 1.6 2000-01-17 06:24:23 itojun Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/machdep.c,v 1.7 2001-06-27 05:42:04 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -32,7 +32,16 @@ static const char rcsid[] = #ifdef __osf__ #include #include -#endif + +#if !defined(HAVE_SNPRINTF) +#ifndef HAVE___ATTRIBUTE__ +#define __attribute__(x) +#endif /* HAVE___ATTRIBUTE__ */ + +int snprintf(char *, size_t, const char *, ...) + __attribute__((format(printf, 3, 4))); +#endif /* !defined(HAVE_SNPRINTF) */ +#endif /* __osf__ */ #include "machdep.h" -- cgit v1.2.1