From 51eedb216b8191094bb625017bb9f0c357a1d171 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 10 Oct 2006 10:47:04 +0000 Subject: portability fixes --- src/assuan-handler.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/assuan-handler.c') diff --git a/src/assuan-handler.c b/src/assuan-handler.c index bf00d1a..19dab71 100644 --- a/src/assuan-handler.c +++ b/src/assuan-handler.c @@ -506,14 +506,20 @@ process_request (assuan_context_t ctx) problem if they are not available. We need to make sure that we are using ELF because only this guarantees that weak symbol support is available in case GNU ld is not - used. */ + used. It seems that old gcc versions don't implement the + weak attribute properly but it works with the weak + pragma. */ + unsigned int source, code; int gpg_strerror_r (unsigned int err, char *buf, size_t buflen) __attribute__ ((weak)); - const char *gpg_strsource (unsigned int err) __attribute__ ((weak)); +#if !defined(HAVE_W32_SYSTEM) && __GNUC__ < 3 +#pragma weak gpg_strerror_r +#pragma weak gpg_strsource +#endif source = ((rc >> 24) & 0xff); code = (rc & 0x00ffffff); -- cgit v1.2.3