summaryrefslogtreecommitdiff
path: root/tools/include/nolibc/stdlib.h
diff options
context:
space:
mode:
authorThomas Weißschuh <linux@weissschuh.net>2025-01-23 21:10:42 +0100
committerThomas Weißschuh <linux@weissschuh.net>2025-02-03 20:57:37 +0100
commit0de64754a55470adb0a870f3105c8922334bb6fe (patch)
tree363d7546e4d174e9e19298aa6497c756f4adf829 /tools/include/nolibc/stdlib.h
parent2014c95afecee3e76ca4a56956a936e23283f05b (diff)
tools/nolibc: add prototypes for non-static functions
With -Wmissing-prototypes the compiler will warn about non-static functions which don't have a prototype defined. This warning doesn't make much sense for nolibc itself but for user code it is still useful. To pacify the compiler add prototypes next to the function definitions, similar to how it is handled elsewhere in the kernel. Acked-by: Willy Tarreau <w@1wt.eu> Link: https://lore.kernel.org/r/20250123-nolibc-prototype-v1-1-e1afc5c1999a@weissschuh.net Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Diffstat (limited to 'tools/include/nolibc/stdlib.h')
-rw-r--r--tools/include/nolibc/stdlib.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/include/nolibc/stdlib.h b/tools/include/nolibc/stdlib.h
index 75aa273c23a6..86ad378ab1ea 100644
--- a/tools/include/nolibc/stdlib.h
+++ b/tools/include/nolibc/stdlib.h
@@ -30,6 +30,7 @@ static __attribute__((unused)) char itoa_buffer[21];
*/
/* must be exported, as it's used by libgcc for various divide functions */
+void abort(void);
__attribute__((weak,unused,noreturn,section(".text.nolibc_abort")))
void abort(void)
{