Index: src/OFThread.m ================================================================== --- src/OFThread.m +++ src/OFThread.m @@ -33,10 +33,18 @@ #endif #if defined(OF_HAVE_THREADS) && defined(__HAIKU__) # include #endif + +#ifdef __wii__ +# define BOOL OGC_BOOL +# define asm __asm__ +# include +# undef BOOL +# undef asm +#endif #import "OFThread.h" #import "OFThread+Private.h" #import "OFRunLoop.h" #import "OFList.h" @@ -191,11 +199,16 @@ rqtp.tv_nsec = lrint((timeInterval - rqtp.tv_sec) * 1000000000); if (rqtp.tv_sec != floor(timeInterval)) @throw [OFOutOfRangeException exception]; +# ifndef __wii__ nanosleep(&rqtp, NULL); +# else + /* Wii has an incompatible nanosleep */ + nanosleep(&rqtp); +# endif #else if (timeInterval > UINT_MAX) @throw [OFOutOfRangeException exception]; sleep((unsigned int)timeInterval); Index: tests/TestsAppDelegate.m ================================================================== --- tests/TestsAppDelegate.m +++ tests/TestsAppDelegate.m @@ -35,13 +35,15 @@ PSP_MODULE_INFO("ObjFW Tests", 0, 0, 0); #endif #ifdef __wii__ # define BOOL OGC_BOOL +# define asm __asm__ # include # include # undef BOOL +# undef asm #endif enum { NO_COLOR, RED,