diff options
author | Guy Harris <guy@alum.mit.edu> | 2002-01-30 10:10:03 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2002-01-30 10:10:03 +0000 |
commit | e6f24ee9515c746b91136f9dc3efc3d40afdab9b (patch) | |
tree | 6796a6316344e48dd654dc265ef54da479b3ca65 /text2pcap.c | |
parent | 7bd0d9a4f705dc0538683f9bcd6971e464cd4e50 (diff) |
Alas, on Solaris, defining _XOPEN_SOURCE causes some things not in the
X/Open specs *not* to be defined, so we also have to define
__EXTENSIONS__.
XXX - can we just define __USE_XOPEN, and not define _XOPEN_SOURCE? Is
that sufficient to get "strptime()" declared on all platforms?
svn path=/trunk/; revision=4629
Diffstat (limited to 'text2pcap.c')
-rw-r--r-- | text2pcap.c | 14 |
1 files changed, 13 insertions, 1 deletions
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> |