Merge: Fix warnings from clang on OS X
authorJean Privat <jean@pryen.org>
Tue, 31 Mar 2015 00:44:23 +0000 (07:44 +0700)
committerJean Privat <jean@pryen.org>
Tue, 31 Mar 2015 00:44:23 +0000 (07:44 +0700)
Pull-Request: #1222
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>

lib/standard/exec_nit.c
src/compiler/abstract_compiler.nit

index 5b5ffbb..93f5f9b 100644 (file)
@@ -149,4 +149,5 @@ int string_NativeString_NativeString_system_0(const char *cmd) {
                // cmd exited on SIGINT: in my opinion the user wants the main to be discontinued
                kill(getpid(), SIGINT);
        }
+       return status;
 }
index 658f0e7..74ef262 100644 (file)
@@ -589,6 +589,8 @@ abstract class AbstractCompiler
                self.header.add_decl("#include <stdlib.h>")
                self.header.add_decl("#include <stdio.h>")
                self.header.add_decl("#include <string.h>")
+               self.header.add_decl("#include <sys/types.h>\n")
+               self.header.add_decl("#include <unistd.h>\n")
                self.header.add_decl("#include \"gc_chooser.h\"")
                self.header.add_decl("#ifdef ANDROID")
                self.header.add_decl("  #include <android/log.h>")