From 4b2c303873b461902dd741510595e484a5b18dcb Mon Sep 17 00:00:00 2001 From: Bananymous Date: Tue, 14 Jan 2025 18:33:57 +0200 Subject: [PATCH] LibC: Add weak_alias header that defines a weak_alias macro --- userspace/libraries/LibC/include/sys/weak_alias.h | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 userspace/libraries/LibC/include/sys/weak_alias.h diff --git a/userspace/libraries/LibC/include/sys/weak_alias.h b/userspace/libraries/LibC/include/sys/weak_alias.h new file mode 100644 index 00000000..46d747ec --- /dev/null +++ b/userspace/libraries/LibC/include/sys/weak_alias.h @@ -0,0 +1,7 @@ +#ifndef _SYS_WEAK_ALIAS +#define _SYS_WEAK_ALIAS 1 + +#define weak_alias(name, aliasname) _weak_alias (name, aliasname) +#define _weak_alias(name, aliasname) extern __typeof (name) aliasname __attribute__ ((weak, alias (#name))) + +#endif