]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Declare "snprintf()" if we are pulling in our own "snprintf()", so that
authorguy <guy>
Wed, 27 Jun 2001 05:42:04 +0000 (05:42 +0000)
committerguy <guy>
Wed, 27 Jun 2001 05:42:04 +0000 (05:42 +0000)
we don't get compiler warnings about it being undeclared.

machdep.c

index 8c7c4a5b0cda842ca24410d3af148b55a2dbf9c4..1bc141de8c44c88c21f9853e74ff2dc23242e2c1 100644 (file)
--- 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"