These are already defined in cgcc but not yet by sparse itself. So, add them now. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> --- predefine.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/predefine.c b/predefine.c index d05b1018fdce..0e9f73eb2340 100644 --- a/predefine.c +++ b/predefine.c @@ -216,10 +216,16 @@ void predefined_macros(void) predefine_nostd("unix"); } - if (arch_os == OS_SUNOS) { + switch (arch_os) { + case OS_LINUX: + predefine("__linux__", 1, "1"); + predefine("__linux", 1, "1"); + break; + case OS_SUNOS: predefine("__sun__", 1, "1"); predefine("__sun", 1, "1"); predefine_nostd("sun"); predefine("__svr4__", 1, "1"); + break; } } -- 2.27.0