Skip to content
Snippets Groups Projects
Commit cda5f94e authored by Masahiro Yamada's avatar Masahiro Yamada
Browse files

modpost: avoid using the alias attribute

Aiden Leong reported modpost fails to build on macOS since commit
16a473f6 ("modpost: inform compilers that fatal() never returns"):

  scripts/mod/modpost.c:93:21: error: aliases are not supported on darwin

Nathan's research indicates that Darwin seems to support weak aliases
at least [1]. Although the situation might be improved in future Clang
versions, we can achieve a similar outcome without relying on it.

This commit makes fatal() a macro of error() + exit(1) in modpost.h, as
compilers recognize that exit() never returns.

[1]: https://github.com/llvm/llvm-project/issues/71001



Fixes: 16a473f6 ("modpost: inform compilers that fatal() never returns")
Reported-by: default avatarAiden Leong <aiden.leong@aibsd.com>
Closes: https://lore.kernel.org/all/d9ac2960-6644-4a87-b5e4-4bfb6e0364a8@aibsd.com/


Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
parent 89876175
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment