diff options
author | gram <gram@f5534014-38df-0310-8fa8-9805f1628bb7> | 2002-01-29 22:57:31 +0000 |
---|---|---|
committer | gram <gram@f5534014-38df-0310-8fa8-9805f1628bb7> | 2002-01-29 22:57:31 +0000 |
commit | ec3340b9451ecec05858682f5d260230b17df222 (patch) | |
tree | d03a88be9e8d97a07121a8cbaec118d59fe8e5dd /text2pcap.c | |
parent | 865f93f2e353be71024e38ecdbb9815eec5ffa1e (diff) |
Use:
#ifndef _XOPEN_SOURCE
#define _XOPEN_SOURCE 500
#endif
#define __USE_XOPEN
#include <time.h>
to get strptime() declared in time.h on various systems. I hope
this helps more than it hurts.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4624 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'text2pcap.c')
-rw-r--r-- | text2pcap.c | 13 |
1 files changed, 12 insertions, 1 deletions
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> |