Skip to content

Commit

Permalink
newlib updates for gcc 14
Browse files Browse the repository at this point in the history
  • Loading branch information
artemiy-volkov committed Apr 10, 2024
1 parent 1f48945 commit 10b7dbe
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion libgloss/riscv/sys_access.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
2 changes: 1 addition & 1 deletion libgloss/riscv/sys_faccessat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
2 changes: 1 addition & 1 deletion libgloss/riscv/sys_fstat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
2 changes: 1 addition & 1 deletion libgloss/riscv/sys_fstatat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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, &kst, flags, 0, 0);
_conv_stat (st, &kst);
return rv;
}
2 changes: 1 addition & 1 deletion newlib/libc/include/math.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion newlib/libc/reent/getentropyr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 10b7dbe

Please sign in to comment.