lib/pthreads: less warnings on OS X
authorAlexis Laferrière <alexis.laf@xymus.net>
Sat, 23 Apr 2016 13:43:12 +0000 (09:43 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Sat, 23 Apr 2016 14:06:55 +0000 (10:06 -0400)
unknown-attributes error are thrown by the inclusion of `gc.h`.

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

lib/pthreads/pthreads.nit

index a1c43a2..1db10b2 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".