--- a/shared/wl_linux.c +++ b/shared/wl_linux.c @@ -13,6 +13,7 @@ */ #include +#include #include #include #include @@ -20,10 +21,10 @@ #include #include -typedef u_int64_t u64; -typedef u_int32_t u32; -typedef u_int16_t u16; -typedef u_int8_t u8; +typedef uint64_t u64; +typedef uint32_t u32; +typedef uint16_t u16; +typedef uint8_t u8; #include #include --- a/shared/linux_timer.c +++ b/shared/linux_timer.c @@ -125,7 +125,7 @@ void unblock_timer(); static struct event *event_queue = NULL; static struct event *event_freelist; -static uint g_granularity; +static unsigned int g_granularity; static int g_maxevents = 0; uclock_t uclock() --- a/shared/wl.c +++ b/shared/wl.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -263,3 +264,28 @@ wl_printlasterror(char *name) fprintf(stderr, err_buf); } */ + +static int in_assert; /* bss inits to 0. */ + +void __assert(const char *assertion, const char * filename, + unsigned int linenumber, register const char * function) +{ + if (!in_assert) { + in_assert = 1; + + fprintf(stderr, +#ifdef ASSERT_SHOW_PROGNAME + "%s: %s: %d: %s: Assertion `%s' failed.\n", __uclibc_progname, +#else + "%s: %d: %s: Assertion `%s' failed.\n", +#endif + filename, + linenumber, + /* Function name isn't available with some compilers. */ + ((function == NULL) ? "?function?" : function), + assertion + ); + } + /* shouldn't we? fflush(stderr); */ + abort(); +}