Fix 'size of tv is unknown' error in brief_async_signal_safe_sleep (musl)
authorMikael Djurfeldt <mikael@djurfeldt.com>
Sun, 26 Feb 2017 19:09:56 +0000 (20:09 +0100)
committerIvan Maidanski <ivmai@mail.ru>
Thu, 2 Mar 2017 21:39:10 +0000 (00:39 +0300)
(fix commits 62097c3, 9f48082)

Include <sys/time.h> to get struct timeval defined and select() declared.

* pthread_stop_world.c [GC_ENABLE_SUSPEND_THREAD]: Include sys/time.h
before GC_brief_async_signal_safe_sleep definition.

pthread_stop_world.c

index 3c018cf..2c027bc 100644 (file)
@@ -389,6 +389,8 @@ STATIC void GC_restart_handler(int sig)
 # endif /* !USE_TKILL_ON_ANDROID */
 
 # ifdef GC_ENABLE_SUSPEND_THREAD
+#   include <sys/time.h>
+
     STATIC void GC_brief_async_signal_safe_sleep(void)
     {
       struct timeval tv;