From 48eefee7495c6e145f3fcfe6ab83f9e8bc27a1ec Mon Sep 17 00:00:00 2001 From: Stijn Tintel Date: Thu, 24 Nov 2022 06:21:06 +0200 Subject: [PATCH] Fix build against musl libc. The musl C library does not define __attribute_const__. Add it to include/linux/compiler.h with a guard to fix build against musl libc. Signed-off-by: Stijn Tintel --- include/linux/compiler.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 6d039ea..39df1f1 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -10,6 +10,10 @@ # define __always_inline inline __attribute__((always_inline)) #endif +#ifndef __attribute_const__ +#define __attribute_const__ __attribute__((__const__)) +#endif + #ifdef __ANDROID__ /* * FIXME: Big hammer to get rid of tons of: -- 2.39.2