From e35cb5bc3d103927bbb6500d50b11247eaa95082 Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Thu, 8 Jun 2023 14:43:05 -0500 Subject: [PATCH] linuxkm/linuxkm_wc_port.h: override definition of __is_constexpr() from /usr/src/linux/include/linux/const.h with warning-free __builtin_constant_p(). --- linuxkm/linuxkm_wc_port.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/linuxkm/linuxkm_wc_port.h b/linuxkm/linuxkm_wc_port.h index bc17aa57f..2794dba68 100644 --- a/linuxkm/linuxkm_wc_port.h +++ b/linuxkm/linuxkm_wc_port.h @@ -199,6 +199,10 @@ _Pragma("GCC diagnostic pop"); + /* avoid -Wpointer-arith, encountered when -DCONFIG_FORTIFY_SOURCE */ + #undef __is_constexpr + #define __is_constexpr(x) __builtin_constant_p(x) + /* the kernel uses -std=c89, but not -pedantic, and makes full use of anon * structs/unions, so we should too. */