diff mbox series

[uclibc-ng-devel] Fix riscv32 build with gcc-14.

Message ID 20240518055947.166657-1-dm.chestnykh@gmail.com
State Accepted
Headers show
Series [uclibc-ng-devel] Fix riscv32 build with gcc-14. | expand

Commit Message

Dmitry Chestnykh May 18, 2024, 5:59 a.m. UTC
Add missing includes and function decls.

Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
---
 libc/sysdeps/linux/common/not-cancel.h               | 2 ++
 libpthread/linuxthreads/sysdeps/pthread/not-cancel.h | 2 ++
 libpthread/nptl/sysdeps/unix/sysv/linux/not-cancel.h | 2 ++
 3 files changed, 6 insertions(+)

Comments

Waldemar Brodkorb May 18, 2024, 11:19 a.m. UTC | #1
Hi Dmitry,
Dmitry Chestnykh wrote,

> Add missing includes and function decls.
> 
Thanks a lot. Tested, commited and pushed,
 best regards
  Waldemar
diff mbox series

Patch

diff --git a/libc/sysdeps/linux/common/not-cancel.h b/libc/sysdeps/linux/common/not-cancel.h
index e4fb1d7fe..426edcc46 100644
--- a/libc/sysdeps/linux/common/not-cancel.h
+++ b/libc/sysdeps/linux/common/not-cancel.h
@@ -19,6 +19,7 @@ 
 
 #include <sys/types.h>
 #include <sysdep.h>
+#include <time.h>
 
 #ifdef NOT_IN_libc
 
@@ -114,6 +115,7 @@  extern __typeof(pause) __pause_nocancel;
 # define nanosleep_not_cancel(requested_time, remaining) \
   INLINE_SYSCALL (nanosleep, 2, requested_time, remaining)
 #else
+extern int __nanosleep_nocancel (const struct timespec *requested_time, struct timespec *remaining);
 # define nanosleep_not_cancel(requested_time, remaining) \
   __nanosleep_nocancel (requested_time, remaining)
 #endif
diff --git a/libpthread/linuxthreads/sysdeps/pthread/not-cancel.h b/libpthread/linuxthreads/sysdeps/pthread/not-cancel.h
index bbdb0739c..6d7c4d70a 100644
--- a/libpthread/linuxthreads/sysdeps/pthread/not-cancel.h
+++ b/libpthread/linuxthreads/sysdeps/pthread/not-cancel.h
@@ -19,6 +19,7 @@ 
 
 #include <sys/types.h>
 #include <sysdep.h>
+#include <time.h>
 
 /* Uncancelable open.  */
 #if defined __NR_openat && !defined __NR_open
@@ -104,6 +105,7 @@  extern int __openat64_nocancel (int fd, const char *fname, int oflag,
 # define nanosleep_not_cancel(requested_time, remaining) \
   INLINE_SYSCALL (nanosleep, 2, requested_time, remaining)
 #else
+extern int __nanosleep_nocancel (const struct timespec *requested_time, struct timespec *remaining);
 # define nanosleep_not_cancel(requested_time, remaining) \
   __nanosleep_nocancel (requested_time, remaining)
 #endif
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/not-cancel.h b/libpthread/nptl/sysdeps/unix/sysv/linux/not-cancel.h
index bbdb0739c..6d7c4d70a 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/not-cancel.h
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/not-cancel.h
@@ -19,6 +19,7 @@ 
 
 #include <sys/types.h>
 #include <sysdep.h>
+#include <time.h>
 
 /* Uncancelable open.  */
 #if defined __NR_openat && !defined __NR_open
@@ -104,6 +105,7 @@  extern int __openat64_nocancel (int fd, const char *fname, int oflag,
 # define nanosleep_not_cancel(requested_time, remaining) \
   INLINE_SYSCALL (nanosleep, 2, requested_time, remaining)
 #else
+extern int __nanosleep_nocancel (const struct timespec *requested_time, struct timespec *remaining);
 # define nanosleep_not_cancel(requested_time, remaining) \
   __nanosleep_nocancel (requested_time, remaining)
 #endif