On Tue, May 19, 2009 at 02:49:19PM +0100, David Chisnall wrote: > Does it work if you put them in runtime.c, after the #include > "runtime.h"? I'd rather not put these in a public header if I can > avoid it, but I'd like to get the framework working on GNU.
Defining __USE_BSD in runtime.c and __USE_UNIX98 in sync.m does the trick as well. Patch attached. Niels
Index: Frameworks/ObjectiveC2/runtime.c =================================================================== --- Frameworks/ObjectiveC2/runtime.c (revision 4664) +++ Frameworks/ObjectiveC2/runtime.c (working copy) @@ -1,5 +1,11 @@ #include "runtime.h" +/* Make glibc export strdup() */ + +#if defined __GNU_LIBRARY__ + #define __USE_BSD +#endif + #undef __objc_INCLUDE_GNU #undef __thread_INCLUDE_GNU #undef __objc_api_INCLUDE_GNU Index: Frameworks/ObjectiveC2/sync.m =================================================================== --- Frameworks/ObjectiveC2/sync.m (revision 4664) +++ Frameworks/ObjectiveC2/sync.m (working copy) @@ -1,4 +1,10 @@ #include "runtime.h" + +/* Ensure Unix98 compatible pthreads for glibc */ +#if defined __GNU_LIBRARY__ + #define __USE_UNIX98 +#endif + #include <pthread.h> #include <stdio.h> #include <stdlib.h>
_______________________________________________ Etoile-dev mailing list Etoile-dev@gna.org https://mail.gna.org/listinfo/etoile-dev