Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: [Wireshark-dev] [PATCH] strptime implicit declaration warning

From: Sebastien Tandel <sebastien@xxxxxxxxx>
Date: Tue, 16 Jan 2007 18:21:44 +0100
Hi,


   a patch to avoid the warning "implicit declaration of function
'strptime'" in editcap.c
glib.h is included just after the define __USE_XOPEN and include <time.h>



Regards,

Sebastien Tandel
Index: editcap.c
===================================================================
--- editcap.c	(r�vision 20453)
+++ editcap.c	(copie de travail)
@@ -15,6 +15,14 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+
+/*
+ * Just make sure we include the prototype for strptime as well
+ * (needed for glibc 2.2)
+ */
+
+#define __USE_XOPEN
+#include <time.h>
 #include <glib.h>
 
 #ifdef HAVE_UNISTD_H
@@ -22,13 +30,7 @@
 #endif
 
 
-/*
- * Just make sure we include the prototype for strptime as well
- * (needed for glibc 2.2)
- */
-#define __USE_XOPEN
 
-#include <time.h>
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
 #endif