summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/dietlibc/libcruft/herrno_location.c
diff options
context:
space:
mode:
Diffstat (limited to 'mdk-stage1/dietlibc/libcruft/herrno_location.c')
-rw-r--r--mdk-stage1/dietlibc/libcruft/herrno_location.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/mdk-stage1/dietlibc/libcruft/herrno_location.c b/mdk-stage1/dietlibc/libcruft/herrno_location.c
index 203f73d4b..5908fe212 100644
--- a/mdk-stage1/dietlibc/libcruft/herrno_location.c
+++ b/mdk-stage1/dietlibc/libcruft/herrno_location.c
@@ -1,5 +1,8 @@
-extern int h_errno;
+#include <errno.h>
+#include <resolv.h>
+#include <netdb.h>
-int *__h_errno_location() { return &h_errno; }
+int *__h_errno_location(void);
+int *__h_errno_location(void) { return &h_errno; }
-int *h_errno_location() __attribute__((weak,alias("__h_errno_location")));
+int *h_errno_location(void) __attribute__((weak,alias("__h_errno_location")));