--- text2pcap.c +++ text2pcap.c @@ -77,6 +77,19 @@ * snaplength is automatically set to 64K. */ +/* + * 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 + * yet defined. + */ + +#ifndef __USE_XOPEN +# define __USE_XOPEN +#endif +#ifndef _XOPEN_SOURCE +# define _XOPEN_SOURCE +#endif + #ifdef HAVE_CONFIG_H # include "config.h" #endif @@ -87,15 +100,6 @@ #include #include -/* - * 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 - * yet defined. - */ -#ifndef __USE_XOPEN -# define __USE_XOPEN -#endif - #include #include