[uClibc]strerror_r undefined in libc/inet/rpc/clnt_perror.c

Miles Bader miles at lsi.nec.co.jp
Tue Jul 23 09:25:54 UTC 2002


clnt_perror.c uses strerror_r, and I'm getting a link-time failure:

   clnt_perror.o(.text+0xbc): undefined reference to `strerror_r'

strerror_r is apparently supposed to be defined as an alias to one of
several other functions in <string.h>, and clnt_perror.c _does_ include
<string.h>, but I'm not entirely clear how the aliasing is supposed to
happen.

<string.h> says essentially (I've edited out the __REDIRECT variants):

#if defined(__USE_XOPEN2K) && !defined(__USE_GNU)
# define strerror_r _susv3_strerror_r
#elif defined(__USE_MISC)
# define strerror_r _glibc_strerror_r
#endif

However, looking at <features.h>, it appears that __USE_MISC should be
defined by default, so I'm not sure why this isn't working.

Thanks,

-Miles
-- 
"Most attacks seem to take place at night, during a rainstorm, uphill,
 where four map sheets join."   -- Anon. British Officer in WW I



More information about the uClibc mailing list