@@ -55,17 +55,23 @@ float __expf_finite(float x) { return expf(x); }
5555int __fgetc_unlocked (FILE * stream ) { return fgetc (stream ); }
5656double __log_finite (double x ) { return log (x ); }
5757
58- #if !defined(__riscv ) && !defined(__riscv__ )
58+ #if !defined(__riscv ) || !defined(__riscv__ )
5959void * mmap (void * start , size_t len , int prot , int flags , int fd , uint32_t off ) {
6060 return (void * )syscall (SYS_mmap2 , start , len , prot , flags , fd , off >> 12 );
6161}
6262
63+ void * __mmap64 (void * start , size_t len , int prot , int flags , int fd , off_t off ) {
64+ return (void * )syscall (SYS_mmap2 , start , len , prot , flags , fd , off >> 12 );
65+ }
6366#if !(defined(__ARM_PCS_VFP ) && defined(__UCLIBC__ ))
6467void * mmap64 (void * start , size_t len , int prot , int flags , int fd , off_t off ) {
6568 return (void * )syscall (SYS_mmap2 , start , len , prot , flags , fd , off >> 12 );
6669}
6770#endif
6871#else
72+ void * __mmap64 (void * start , size_t len , int prot , int flags , int fd , off_t off ) {
73+ return (void * )syscall (SYS_mmap , start , len , prot , flags , fd , off );
74+ }
6975void * mmap64 (void * start , size_t len , int prot , int flags , int fd , off_t off ) {
7076 return (void * )syscall (SYS_mmap , start , len , prot , flags , fd , off );
7177}
0 commit comments