diff --git a/test/pthread/test_pthread_locale.c b/test/pthread/test_pthread_locale.c index b81b533f47e9a..f0f4648d0512d 100644 --- a/test/pthread/test_pthread_locale.c +++ b/test/pthread/test_pthread_locale.c @@ -9,24 +9,16 @@ #include #include #include +#include #include -// This is really rather naughty, we shouldn't be including -// musl-internal headers like this. -#define weak __attribute__(__weak__) -#define hidden __attribute__((__visibility__("hidden"))) -#include "pthread_impl.h" - -#define NUM_THREADS 1 locale_t do_test() { pthread_t thread = pthread_self(); - locale_t loc = thread->locale; + locale_t loc = uselocale((locale_t)0); printf(" pthread_self() = %p\n", thread); - printf(" pthread_self()->locale = %p\n", loc); + printf(" current locale: %p\n", loc); - if (!loc) { - puts("ERROR: loc is null"); - } + assert(loc); return loc; } diff --git a/test/test_browser.py b/test/test_browser.py index a0103829d072d..fa45fb11cebf8 100644 --- a/test/test_browser.py +++ b/test/test_browser.py @@ -4576,8 +4576,6 @@ def test_fetch_redirect(self): 'mt': (['-pthread', '-sPTHREAD_POOL_SIZE=2'],), }) def test_pthread_locale(self, args): - self.cflags.append('-I' + path_from_root('system/lib/libc/musl/src/internal')) - self.cflags.append('-I' + path_from_root('system/lib/pthread')) self.btest_exit('pthread/test_pthread_locale.c', cflags=args) # Tests the Emscripten HTML5 API emscripten_set_canvas_element_size() and