Skip to content

Conversation

@bkuhls
Copy link
Contributor

@bkuhls bkuhls commented Dec 5, 2025

No description provided.

charlie-rivos and others added 7 commits December 5, 2025 18:11
A signal handler is required to have a signum parameter that is an
integer.

This patch is used by buildroot for GCC 15.x compatibility:
https://gitlab.com/buildroot.org/buildroot/-/commit/6fd3e498af1bf837f3318eb0d47f27ac6901e7dc

Signed-off-by: Charlie Jenkins <charlie@rivosinc.com>
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Some compilers (such as the bootlin riscv64-lp64d glibc bleeding-edge
2024.05-1 toolchain) fail to run the dependency checking scripts and
error at "return type defaults to ‘int’ [-Wimplicit-int]". Add types
to these main() functions to allow this dependency tracking to work.

This patch is used by buildroot for GCC 15.x compatibility:
https://gitlab.com/buildroot.org/buildroot/-/commit/6fd3e498af1bf837f3318eb0d47f27ac6901e7dc

Signed-off-by: Charlie Jenkins <charlie@rivosinc.com>
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
GCC-15 requires function declarations to be properly typed.

This patch is used by buildroot for GCC 15.x compatibility:
https://gitlab.com/buildroot.org/buildroot/-/commit/6fd3e498af1bf837f3318eb0d47f27ac6901e7dc

Signed-off-by: Charlie Jenkins <charlie@rivosinc.com>
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
lat_sig.c:42:31: error: assignment to '__sighandler_t' {aka 'void (*)(int)'} from incompatible pointer type 'void (*)(void)' [-Wincompatible-pointer-types]
   42 |                 sa.sa_handler = handler;
      |                               ^
lat_sig.c:23:9: note: 'handler' declared here
   23 | void    handler() { }

lat_sig.c:95:23: error: assignment to '__sighandler_t' {aka 'void (*)(int)'} from incompatible pointer type 'void (*)(void)' [-Wincompatible-pointer-types]
   95 |         sa.sa_handler = prot;
      |                       ^
lat_sig.c:72:1: note: 'prot' declared here
   72 | prot() {

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
memsize.c:167:23: error: assignment to '__sighandler_t' {aka 'void (*)(int)'} from incompatible pointer type 'void (*)(void)' [-Wincompatible-pointer-types]
  167 |         sa.sa_handler = gotalarm;
      |                       ^
memsize.c:154:1: note: 'gotalarm' declared here
  154 | gotalarm()

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
lat_unix.c:85:17: error: too many arguments to function 'exit'; expected 0, have 1
   85 |                 exit(1);
      |                 ^~~~ ~
lat_unix.c:74:17: note: declared here
   74 |         void    exit();

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
lat_usleep.c:125:19: error: assignment to '__sighandler_t' {aka 'void (*)(int)'} from incompatible pointer type 'void (*)(void)' [-Wincompatible-pointer-types]
  125 |     sa.sa_handler = interval;
      |                   ^
lat_usleep.c:102:1: note: 'interval' declared here
  102 | interval()

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants