@@ -22,22 +22,34 @@ int sTaT(const char *path, struct _stat_ *buf)
2222 buf -> st_mode = st .st_mode ;
2323 return ret ;
2424}
25+ #else
26+ #include <fcntl.h>
27+ #include <sys/stat.h>
28+
29+ int stat (const char * restrict path , struct stat * restrict buf )
30+ {
31+ return fstatat (AT_FDCWD , path , buf , 0 );
32+ }
2533#endif
2634#endif
2735
2836void __assert (void ) {}
2937void akuio_clean_invalidate_dcache (void ) {}
38+ #ifndef __GLIBC__
3039void backtrace (void ) {}
3140void backtrace_symbols (void ) {}
32- #ifndef __GLIBC__
41+ #endif
3342void __ctype_b (void ) {}
43+ #ifndef __GLIBC__
3444void __ctype_b_loc (void ) {}
3545void __ctype_tolower (void ) {}
3646#endif
3747void _MI_PRINT_GetDebugLevel (void ) {}
3848void __pthread_register_cancel (void ) {}
3949void __pthread_unregister_cancel (void ) {}
50+ #ifndef __UCLIBC__
4051void _stdlib_mb_cur_max (void ) {}
52+ #endif
4153
4254float __expf_finite (float x ) { return expf (x ); }
4355int __fgetc_unlocked (FILE * stream ) { return fgetc (stream ); }
@@ -47,6 +59,11 @@ void *mmap(void *start, size_t len, int prot, int flags, int fd, uint32_t off) {
4759 return (void * )syscall (SYS_mmap2 , start , len , prot , flags , fd , off >> 12 );
4860}
4961
62+ void * __mmap64 (void * start , size_t len , int prot , int flags , int fd , off_t off ) {
63+ return (void * )syscall (SYS_mmap2 , start , len , prot , flags , fd , off >> 12 );
64+ }
65+ #if !(defined(__ARM_PCS_VFP ) && defined(__UCLIBC__ ))
5066void * mmap64 (void * start , size_t len , int prot , int flags , int fd , off_t off ) {
5167 return (void * )syscall (SYS_mmap2 , start , len , prot , flags , fd , off >> 12 );
52- }
68+ }
69+ #endif
0 commit comments