diff options
author | guy <guy> | 2001-06-27 05:42:04 +0000 |
---|---|---|
committer | guy <guy> | 2001-06-27 05:42:04 +0000 |
commit | 0e52a6be256e1e54b5e686429cbce7b4625dc3c4 (patch) | |
tree | 547caeac4ad13ff470b51d3d89f52c6bd5163568 /machdep.c | |
parent | c3d82102cdf773bbd4968ebf97db7a252ced067b (diff) | |
download | tcpdump-0e52a6be256e1e54b5e686429cbce7b4625dc3c4.tar.gz |
Declare "snprintf()" if we are pulling in our own "snprintf()", so that
we don't get compiler warnings about it being undeclared.
Diffstat (limited to 'machdep.c')
-rw-r--r-- | machdep.c | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -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 <sys/sysinfo.h> #include <sys/proc.h> -#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" |