lib/json/store: fix object paths
[nit.git] / lib / pthreads / pthreads.nit
index a1c43a2..8fed1bb 100644 (file)
@@ -16,7 +16,7 @@
 
 # Main POSIX threads support and intro the classes `Thread`, `Mutex` and `Barrier`
 module pthreads is
-       cflags "-pthread"
+       cflags "-pthread -Wno-unknown-attributes"
        ldflags "-pthread"
        pkgconfig "bdw-gc"
        new_annotation threaded
@@ -33,6 +33,8 @@ in "C Header" `{
 `}
 
 in "C" `{
+       #include <string.h>
+
        // TODO protect with: #ifdef WITH_LIBGC
        // We might have to add the next line to gc_chooser.c too, especially
        // if we get an error like "thread not registered with GC".
@@ -126,7 +128,7 @@ private extern class NativePthread in "C" `{ pthread_t * `}
 
        fun equal(other: NativePthread): Bool `{ return pthread_equal(*self, *other); `}
 
-       fun kill(signal: Int) `{ pthread_kill(*self, signal); `}
+       fun kill(signal: Int) `{ pthread_kill(*self, (int)signal); `}
 end
 
 private extern class NativePthreadAttr in "C" `{ pthread_attr_t * `}