From b16106f89f474978b22d8c7e555bc61634d6766f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Mayer?= Date: Sun, 22 Apr 2007 20:04:34 +0000 Subject: [PATCH] Only #deinfe __USE_XOPEN if not already defined. On my Suse 10.2 it was already #defined to 1, so this would create a warning/error. svn path=/trunk/; revision=21508 --- editcap.c | 8 ++++++-- epan/ftypes/ftype-time.c | 7 +++++-- text2pcap.c | 7 +++++-- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/editcap.c b/editcap.c index 4084652418..2a11bf7a10 100644 --- a/editcap.c +++ b/editcap.c @@ -18,10 +18,14 @@ /* * Just make sure we include the prototype for strptime as well - * (needed for glibc 2.2) + * (needed for glibc 2.2) but make sure we do this only if not + * yet defined. */ -#define __USE_XOPEN +#ifndef __USE_XOPEN +# define __USE_XOPEN +#endif + #include #include diff --git a/epan/ftypes/ftype-time.c b/epan/ftypes/ftype-time.c index cd2663ac80..ed50e3b160 100644 --- a/epan/ftypes/ftype-time.c +++ b/epan/ftypes/ftype-time.c @@ -29,9 +29,12 @@ /* * Just make sure we include the prototype for strptime as well - * (needed for glibc 2.2) + * (needed for glibc 2.2) but make sure we do this only if not + * yet defined. */ -#define __USE_XOPEN +#ifndef __USE_XOPEN +# define __USE_XOPEN +#endif #include diff --git a/text2pcap.c b/text2pcap.c index ea058f2249..a7349b9ce5 100644 --- a/text2pcap.c +++ b/text2pcap.c @@ -88,9 +88,12 @@ /* * Just make sure we include the prototype for strptime as well - * (needed for glibc 2.2) + * (needed for glibc 2.2) but make sure we do this only if not + * yet defined. */ -#define __USE_XOPEN +#ifndef +# define __USE_XOPEN +#endif #include #include