Page MenuHome GnuPG

libassuan 3.0.1: putc_unlocked() is re-defined unconditionally
Testing, NormalPublic

Description

In src/assuan-defs.h, putc_unlocked() is re-defined unconditionally, because the presence of putc_unlocked() is never determined in configure.

#ifndef HAVE_PUTC_UNLOCKED
int putc_unlocked (int c, FILE *stream);
#endif

That leads to duplicate symbol '___sputc' while linking on macOS.

I propose this fix:

--- configure.ac.orig	2024-08-09 11:58:20.924113872 +0000
+++ configure.ac
@@ -407,7 +407,7 @@ AM_CONDITIONAL(USE_GPGRT_CONFIG, [test -
 # Checks for library functions.
 #
 AC_CHECK_FUNCS([flockfile funlockfile inet_pton stat getaddrinfo \
-                getrlimit ])
+                getrlimit putc_unlocked])
 
 # If we didn't find inet_pton, it might be in -lsocket (which might
 # require -lnsl)

Details

Version
3.0.1

Event Timeline

moubctez renamed this task from libassaun 3.0.1: putc_unlocked() is re-defined unconditionally to libassuan 3.0.1: putc_unlocked() is re-defined unconditionally.Aug 9 2024, 2:00 PM
moubctez created this task.
werner added a subscriber: werner.

Actually we should get rid of stdio functions and use the es_foo replacements from libgpg-error.

werner triaged this task as Normal priority.Aug 16 2024, 3:04 PM
gniibe changed the task status from Open to Testing.Thu, Sep 12, 7:12 AM