Fix for http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2183
Strptime function is not properly included. It needs __USE_XOPEN macro, but it
is defined in wrong place. It must be defined before _any_ include file.
Otherwise I get "implicit declaration of function `strptime`" (gcc 4.3.0).
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@24044
f5534014-38df-0310-8fa8-
9805f1628bb7
# include "config.h"
#endif
-#include <ctype.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <wiretap/file_util.h>
-
/*
* Just make sure we include the prototype for strptime as well
* (needed for glibc 2.2) but make sure we do this only if not
#ifndef __USE_XOPEN
# define __USE_XOPEN
#endif
+#ifndef _XOPEN_SOURCE
+# define _XOPEN_SOURCE
+#endif
+
+#include <ctype.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <wiretap/file_util.h>
#include <time.h>
#include <glib.h>