aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--epan/ftypes/ftype-time.c14
-rw-r--r--text2pcap.c14
2 files changed, 26 insertions, 2 deletions
diff --git a/epan/ftypes/ftype-time.c b/epan/ftypes/ftype-time.c
index 06d8756be9..25c7f3d7b3 100644
--- a/epan/ftypes/ftype-time.c
+++ b/epan/ftypes/ftype-time.c
@@ -1,5 +1,5 @@
/*
- * $Id: ftype-time.c,v 1.13 2002/01/29 22:57:31 gram Exp $
+ * $Id: ftype-time.c,v 1.14 2002/01/30 10:10:03 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -36,6 +36,18 @@
#endif
#define __USE_XOPEN
+/*
+ * Defining _XOPEN_SOURCE is needed on some platforms, e.g. platforms
+ * using glibc, to expand the set of things system header files define.
+ *
+ * Unfortunately, on other platforms, such as some versions of Solaris,
+ * it *reduces* that set as well, e.g. causing "struct timeval" not
+ * to be defined.
+ *
+ * So we define __EXTENSIONS__ so that "struct timeval" is defined.
+ */
+#define __EXTENSIONS__
+
#include <time.h>
#include <ftypes-int.h>
diff --git a/text2pcap.c b/text2pcap.c
index 17b43d2338..f3e037c3b4 100644
--- a/text2pcap.c
+++ b/text2pcap.c
@@ -6,7 +6,7 @@
*
* (c) Copyright 2001 Ashok Narayanan <ashokn@cisco.com>
*
- * $Id: text2pcap.c,v 1.12 2002/01/29 22:57:30 gram Exp $
+ * $Id: text2pcap.c,v 1.13 2002/01/30 10:10:01 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -95,6 +95,18 @@
#endif
#define __USE_XOPEN
+/*
+ * Defining _XOPEN_SOURCE is needed on some platforms, e.g. platforms
+ * using glibc, to expand the set of things system header files define.
+ *
+ * Unfortunately, on other platforms, such as some versions of Solaris,
+ * it *reduces* that set as well, e.g. causing "struct timeval" not
+ * to be defined.
+ *
+ * So we define __EXTENSIONS__ so that "struct timeval" is defined.
+ */
+#define __EXTENSIONS__
+
#include <time.h>
#include <sys/types.h>