diff --git a/libgloss/riscv/sys_access.c b/libgloss/riscv/sys_access.c index 45bedb3f6..cc76b1d11 100644 --- a/libgloss/riscv/sys_access.c +++ b/libgloss/riscv/sys_access.c @@ -5,5 +5,5 @@ int _access(const char *file, int mode) { - return syscall_errno (SYS_access, 2, file, mode, 0, 0, 0, 0); + return syscall_errno (SYS_access, 2, (long int) file, mode, 0, 0, 0, 0); } diff --git a/libgloss/riscv/sys_faccessat.c b/libgloss/riscv/sys_faccessat.c index 6418ef423..7e08f64b8 100644 --- a/libgloss/riscv/sys_faccessat.c +++ b/libgloss/riscv/sys_faccessat.c @@ -4,5 +4,5 @@ /* Permissions of a file (by name) in a given directory. */ int _faccessat(int dirfd, const char *file, int mode, int flags) { - return syscall_errno (SYS_faccessat, 4, dirfd, file, mode, flags, 0, 0); + return syscall_errno (SYS_faccessat, 4, dirfd, (long int) file, mode, flags, 0, 0); } diff --git a/libgloss/riscv/sys_fstat.c b/libgloss/riscv/sys_fstat.c index d97ba445e..000ae5b8c 100644 --- a/libgloss/riscv/sys_fstat.c +++ b/libgloss/riscv/sys_fstat.c @@ -9,7 +9,7 @@ int _fstat(int file, struct stat *st) { struct kernel_stat kst; - int rv = syscall_errno (SYS_fstat, 2, file, &kst, 0, 0, 0, 0); + int rv = syscall_errno (SYS_fstat, 2, file, (long int) &kst, 0, 0, 0, 0); _conv_stat (st, &kst); return rv; } diff --git a/libgloss/riscv/sys_fstatat.c b/libgloss/riscv/sys_fstatat.c index bf0335513..84fac3b83 100644 --- a/libgloss/riscv/sys_fstatat.c +++ b/libgloss/riscv/sys_fstatat.c @@ -8,7 +8,7 @@ int _fstatat(int dirfd, const char *file, struct stat *st, int flags) { struct kernel_stat kst; - int rv = syscall_errno (SYS_fstatat, 4, dirfd, file, &kst, flags, 0, 0); + int rv = syscall_errno (SYS_fstatat, 4, dirfd, (long int) file, (long int) &kst, flags, 0, 0); _conv_stat (st, &kst); return rv; } diff --git a/libgloss/riscv/sys_link.c b/libgloss/riscv/sys_link.c index 83cd1b239..a9f77f238 100644 --- a/libgloss/riscv/sys_link.c +++ b/libgloss/riscv/sys_link.c @@ -4,5 +4,5 @@ /* Establish a new name for an existing file. */ int _link(const char *old_name, const char *new_name) { - return syscall_errno (SYS_link, 2, old_name, new_name, 0, 0, 0, 0); + return syscall_errno (SYS_link, 2, (long int) old_name, (long int) new_name, 0, 0, 0, 0); } diff --git a/libgloss/riscv/sys_lstat.c b/libgloss/riscv/sys_lstat.c index dd5dc5268..bc191fa25 100644 --- a/libgloss/riscv/sys_lstat.c +++ b/libgloss/riscv/sys_lstat.c @@ -7,7 +7,7 @@ int _lstat(const char *file, struct stat *st) { struct kernel_stat kst; - int rv = syscall_errno (SYS_lstat, 2, file, &kst, 0, 0, 0, 0); + int rv = syscall_errno (SYS_lstat, 2, (long int) file, (long int) &kst, 0, 0, 0, 0); _conv_stat (st, &kst); return rv; } diff --git a/libgloss/riscv/sys_open.c b/libgloss/riscv/sys_open.c index eb1a99ba2..c85844081 100644 --- a/libgloss/riscv/sys_open.c +++ b/libgloss/riscv/sys_open.c @@ -5,5 +5,5 @@ int _open(const char *name, int flags, int mode) { - return syscall_errno (SYS_open, 3, name, flags, mode, 0, 0, 0); + return syscall_errno (SYS_open, 3, (long int) name, flags, mode, 0, 0, 0); } diff --git a/libgloss/riscv/sys_openat.c b/libgloss/riscv/sys_openat.c index 652ab2ea7..71f3a6bf5 100644 --- a/libgloss/riscv/sys_openat.c +++ b/libgloss/riscv/sys_openat.c @@ -4,5 +4,5 @@ /* Open file relative to given directory. */ int _openat(int dirfd, const char *name, int flags, int mode) { - return syscall_errno (SYS_openat, 4, dirfd, name, flags, mode, 0, 0); + return syscall_errno (SYS_openat, 4, dirfd, (long int) name, flags, mode, 0, 0); } diff --git a/libgloss/riscv/sys_read.c b/libgloss/riscv/sys_read.c index dd3bc339c..0938e0080 100644 --- a/libgloss/riscv/sys_read.c +++ b/libgloss/riscv/sys_read.c @@ -5,5 +5,5 @@ /* Read from a file. */ ssize_t _read(int file, void *ptr, size_t len) { - return syscall_errno (SYS_read, 3, file, ptr, len, 0, 0, 0); + return syscall_errno (SYS_read, 3, file, (long int) ptr, len, 0, 0, 0); } diff --git a/libgloss/riscv/sys_stat.c b/libgloss/riscv/sys_stat.c index 1e03700df..e586e125c 100644 --- a/libgloss/riscv/sys_stat.c +++ b/libgloss/riscv/sys_stat.c @@ -8,7 +8,7 @@ int _stat(const char *file, struct stat *st) { struct kernel_stat kst; - int rv = syscall_errno (SYS_stat, 2, file, &kst, 0, 0, 0, 0); + int rv = syscall_errno (SYS_stat, 2, (long int) file, (long int) &kst, 0, 0, 0, 0); _conv_stat (st, &kst); return rv; } diff --git a/libgloss/riscv/sys_unlink.c b/libgloss/riscv/sys_unlink.c index 1cf6bbe8b..26f762c49 100644 --- a/libgloss/riscv/sys_unlink.c +++ b/libgloss/riscv/sys_unlink.c @@ -5,5 +5,5 @@ int _unlink(const char *name) { - return syscall_errno (SYS_unlink, 1, name, 0, 0, 0, 0, 0); + return syscall_errno (SYS_unlink, 1, (long int) name, 0, 0, 0, 0, 0); } diff --git a/libgloss/riscv/sys_write.c b/libgloss/riscv/sys_write.c index ce2edd36a..53165fd34 100644 --- a/libgloss/riscv/sys_write.c +++ b/libgloss/riscv/sys_write.c @@ -6,5 +6,5 @@ ssize_t _write(int file, const void *ptr, size_t len) { - return syscall_errno (SYS_write, 3, file, ptr, len, 0, 0, 0); + return syscall_errno (SYS_write, 3, file, (long int) ptr, len, 0, 0, 0); } diff --git a/newlib/libc/include/math.h b/newlib/libc/include/math.h index 87f51335f..834046e3b 100644 --- a/newlib/libc/include/math.h +++ b/newlib/libc/include/math.h @@ -446,7 +446,7 @@ extern float hypotf (float, float); are implemented independently from newlib to be able to use optimized assembler functions despite using the Microsoft x86_64 ABI. */ #if defined (_LDBL_EQ_DBL) || defined (__CYGWIN__) || \ - defined(__aarch64__) || defined(__i386__) || defined(__x86_64__) + defined(__aarch64__) || defined(__i386__) || defined(__x86_64__) || defined(__riscv) /* Reentrant ANSI C functions. */ #ifndef __math_68881 extern long double atanl (long double); diff --git a/newlib/libc/reent/getentropyr.c b/newlib/libc/reent/getentropyr.c index e3f85e41b..3e77b7f1f 100644 --- a/newlib/libc/reent/getentropyr.c +++ b/newlib/libc/reent/getentropyr.c @@ -45,7 +45,7 @@ _getentropy_r (struct _reent *ptr, int ret; errno = 0; - if ((ret = _getentropy (buf, buflen)) == -1 && errno != 0) + if ((ret = getentropy (buf, buflen)) == -1 && errno != 0) _REENT_ERRNO(ptr) = errno; return ret; }