aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--epan/ftypes/ftype-time.c7
-rw-r--r--text2pcap.c13
2 files changed, 16 insertions, 4 deletions
diff --git a/epan/ftypes/ftype-time.c b/epan/ftypes/ftype-time.c
index ebb584296a..06d8756be9 100644
--- a/epan/ftypes/ftype-time.c
+++ b/epan/ftypes/ftype-time.c
@@ -1,5 +1,5 @@
/*
- * $Id: ftype-time.c,v 1.12 2001/12/28 21:30:34 guy Exp $
+ * $Id: ftype-time.c,v 1.13 2002/01/29 22:57:31 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -31,9 +31,10 @@
* Just make sure we include the prototype for strptime as well
* (needed for glibc 2.2)
*/
-#ifndef __USE_XOPEN
-#define __USE_XOPEN
+#ifndef _XOPEN_SOURCE
+#define _XOPEN_SOURCE 500
#endif
+#define __USE_XOPEN
#include <time.h>
diff --git a/text2pcap.c b/text2pcap.c
index 46ec3673df..17b43d2338 100644
--- a/text2pcap.c
+++ b/text2pcap.c
@@ -6,7 +6,7 @@
*
* (c) Copyright 2001 Ashok Narayanan <ashokn@cisco.com>
*
- * $Id: text2pcap.c,v 1.11 2002/01/23 08:35:17 guy Exp $
+ * $Id: text2pcap.c,v 1.12 2002/01/29 22:57:30 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -85,7 +85,18 @@
#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)
+ */
+#ifndef _XOPEN_SOURCE
+#define _XOPEN_SOURCE 500
+#endif
+#define __USE_XOPEN
+
#include <time.h>
+
#include <sys/types.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>