From e7af901b989e16fa75226163e31015265c413ad4 Mon Sep 17 00:00:00 2001 From: Edwin Groothuis Date: Thu, 23 Jan 2003 11:37:10 +0000 Subject: Make it at least compiling on -current again. Still talking to Volker Stolz for the -STABLE version. --- net/cap/files/patch-lib-cap-ablog.c | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) (limited to 'net/cap') diff --git a/net/cap/files/patch-lib-cap-ablog.c b/net/cap/files/patch-lib-cap-ablog.c index 88c1db654032..7a794fb79d67 100644 --- a/net/cap/files/patch-lib-cap-ablog.c +++ b/net/cap/files/patch-lib-cap-ablog.c @@ -1,6 +1,25 @@ ---- lib/cap/ablog.c.foo Mon Nov 4 16:43:02 2002 -+++ lib/cap/ablog.c Mon Nov 4 16:43:11 2002 -@@ -91,7 +91,7 @@ +--- lib/cap/ablog.c.orig Thu Jan 23 01:45:08 2003 ++++ lib/cap/ablog.c Thu Jan 23 03:14:28 2003 +@@ -66,8 +66,17 @@ + * This is something all machine should, but don't have :-) + */ + +-static FILE *lfp = stderr; ++#define GCC_VERSION (__GNUC__ * 10000 \ ++ + __GNUC_MINOR__ * 100 \ ++ + __GNUC_PATCHLEVEL__) + ++#if GCC_VERSION <= 30200 ++static FILE *lfp = stderr; ++#else ++static FILE *lfp; ++static void lfp_construct (void) __attribute__((constructor)); ++static void lfp_construct (void) { lfp = stderr; } ++#endif + + #ifndef USEVPRINTF + /* Bletch - gotta do it because pyramids don't work the other way */ +@@ -91,7 +100,7 @@ #endif USEVPRINTF int saveerr; extern int errno; @@ -9,3 +28,12 @@ #ifndef __FreeBSD__ extern char *sys_errlist[]; #endif +@@ -164,7 +173,7 @@ + static char * + mytod() + { +- long tloc; ++ time_t tloc; + struct tm *tm, *localtime(); + static char buf[100]; /* should be large enough */ + -- cgit v1.2.3