Преглед изворни кода

change errno to static linkage (improves PIC code generation)

Rich Felker пре 14 година
родитељ
комит
71e6be641f
1 измењених фајлова са 2 додато и 4 уклоњено
  1. 2 4
      src/errno/__errno_location.c

+ 2 - 4
src/errno/__errno_location.c

@@ -1,11 +1,9 @@
 #include <errno.h>
 #include "libc.h"
 
-#undef errno
-int errno;
-
 int *__errno_location(void)
 {
+	static int e;
 	if (libc.errno_location) return libc.errno_location();
-	return &errno;
+	return &e;
 }