summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJari Vetoniemi <mailroxas@gmail.com>2018-02-25 15:31:38 +0200
committerJari Vetoniemi <mailroxas@gmail.com>2018-02-25 15:31:38 +0200
commite8c5eaed9bf9f0e6ddb19aab7da134ea9e0c0295 (patch)
tree2e052e2ca8404bf826af2af13f4fabae174dd297 /src
parent856490fb5352e53adbe6b4fba23763500de10e02 (diff)
libc: Implement __page_size and __h_errno
Diffstat (limited to 'src')
-rw-r--r--src/libc.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libc.c b/src/libc.c
index a4fb0f2..0c5c523 100644
--- a/src/libc.c
+++ b/src/libc.c
@@ -9,6 +9,8 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/syscall.h>
+#include <sys/user.h> // PAGE_SIZE, PAGE_SHIFT
+#include <netdb.h> // h_errno
#include "wrapper/verbose.h"
#ifdef VERBOSE_FUNCTIONS
@@ -63,6 +65,7 @@ tkill(int tid, int sig)
const char *bionic__ctype_, *bionic__tolower_tab_, *bionic__toupper_tab_;
char bionic___sF[0x54] = {0};
+unsigned int bionic___page_size = PAGE_SIZE;
__attribute_const__
int*
@@ -71,6 +74,13 @@ bionic___errno(void)
return __errno_location();
}
+__attribute_const__
+int*
+bionic___get_h_errno(void)
+{
+ return &h_errno;
+}
+
int
bionic_stat(const char *restrict path, struct stat *restrict buf)
{