api: fix unistd.h
authornsz <nsz@port70.net>
Sat, 20 Oct 2012 21:36:53 +0000 (23:36 +0200)
committernsz <nsz@port70.net>
Sat, 20 Oct 2012 21:36:53 +0000 (23:36 +0200)
src/api/unistd.c

index cdc6564..d63da54 100644 (file)
@@ -6,7 +6,7 @@ static void f()
 {
 C(_POSIX_VERSION)
 C(_POSIX2_VERSION)
-#ifdef _XOPEN_SOURCE)
+#ifdef _XOPEN_SOURCE
 C(_XOPEN_VERSION)
 #endif
 C(F_OK)
@@ -200,7 +200,7 @@ T(intptr_t)
 {char*(*p)(char*) = ctermid;}
 {int(*p)(int) = dup;}
 {int(*p)(int,int) = dup2;}
-{char **x = environ};
+{extern char **environ; char **x = environ;};
 {int(*p)(const char*,const char*,...) = execl;}
 {int(*p)(const char*,const char*,...) = execle;}
 {int(*p)(const char*,const char*,...) = execlp;}