Open
Conversation
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>
|
This should be merged. Master branch failed to compile with gcc 15.2.1 and these changes fixed all issues on my machine |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.