summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorStijn Tintel <stijn@linux-ipv6.be>2022-11-24 06:21:06 +0200
committerStijn Tintel <stijn@linux-ipv6.be>2022-11-24 06:21:06 +0200
commit48eefee7495c6e145f3fcfe6ab83f9e8bc27a1ec (patch)
treead228176d4f41bdc597a02dc9c293a713829c07d /include
parentf1f88825c371f84edb85a156de5e1962503d23b2 (diff)
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 <stijn@linux-ipv6.be>
Diffstat (limited to 'include')
-rw-r--r--include/linux/compiler.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index 6d039ea3..39df1f16 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: