From e8c5eaed9bf9f0e6ddb19aab7da134ea9e0c0295 Mon Sep 17 00:00:00 2001 From: Jari Vetoniemi Date: Sun, 25 Feb 2018 15:31:38 +0200 Subject: libc: Implement __page_size and __h_errno --- src/libc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') 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 #include #include +#include // PAGE_SIZE, PAGE_SHIFT +#include // 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) { -- cgit v1.2.3-70-g09d2