aboutsummaryrefslogtreecommitdiffstats
path: root/text2pcap.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2008-06-04 18:05:45 +0000
committerGuy Harris <guy@alum.mit.edu>2008-06-04 18:05:45 +0000
commitf6ab1892e69b00964a1760c9a29767ac604e91a6 (patch)
tree7bdd138fce4311e8ea2509ba51f37a3be2a75939 /text2pcap.c
parentacd6d3fb35234dfc5f905a6c4b6e25b571d24e3b (diff)
The joys of beating header files over the head to get all the various
APIs we use declared. We still need to define __EXTENSIONS__ on Solaris, in order to get strptime() declared. svn path=/trunk/; revision=25426
Diffstat (limited to 'text2pcap.c')
-rw-r--r--text2pcap.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/text2pcap.c b/text2pcap.c
index 433df29481..359cacb45f 100644
--- a/text2pcap.c
+++ b/text2pcap.c
@@ -93,6 +93,22 @@
# define _XOPEN_SOURCE
#endif
+/*
+ * 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
+ * (including Solaris 10), it *reduces* that set as well, causing
+ * strptime() not to be declared, presumably because the version of the
+ * X/Open spec that _XOPEN_SOURCE implies doesn't include strptime() and
+ * blah blah blah namespace pollution blah blah blah.
+ *
+ * So we define __EXTENSIONS__ so that "strptime()" is declared.
+ */
+#ifndef __EXTENSIONS__
+# define __EXTENSIONS__
+#endif
+
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>