summaryrefslogtreecommitdiff
path: root/machdep.c
diff options
context:
space:
mode:
authorguy <guy>2001-06-27 05:42:04 +0000
committerguy <guy>2001-06-27 05:42:04 +0000
commit0e52a6be256e1e54b5e686429cbce7b4625dc3c4 (patch)
tree547caeac4ad13ff470b51d3d89f52c6bd5163568 /machdep.c
parentc3d82102cdf773bbd4968ebf97db7a252ced067b (diff)
downloadtcpdump-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.c13
1 files changed, 11 insertions, 2 deletions
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 <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"