[Bug 281] implicit declaration of function `strdup'

bugzilla-daemon at bugzilla.openmoko.org bugzilla-daemon at bugzilla.openmoko.org
Tue Mar 20 01:46:16 CET 2007


http://bugzilla.openmoko.org/cgi-bin/bugzilla/show_bug.cgi?id=281





------- Additional Comments From philippedeswert at scarlet.be  2007-03-20 01:46 -------
the include string.h has the following definition:

#if defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN_EXTENDED
/* Duplicate S, returning an identical malloc'd string.  */
extern char *strdup (__const char *__s)
     __THROW __attribute_malloc__ __nonnull ((1));
#endif

For some reason none of those defines is used, AFAIK __USE_XOPEN_EXTENDED should
be. Maybe someone can clear up that issue for us? 

So if you do the following instead of just including <string.h> it works:

#define __USE_XOPEN_EXTENDED
#include <string.h>

Anyway IMHO that is a temporary workaround.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.




More information about the buglog mailing list