]> git.sesse.net Git - bcachefs-tools-debian/commitdiff
Fix build against musl libc.
authorStijn Tintel <stijn@linux-ipv6.be>
Thu, 24 Nov 2022 04:21:06 +0000 (06:21 +0200)
committerStijn Tintel <stijn@linux-ipv6.be>
Thu, 24 Nov 2022 04:21:06 +0000 (06:21 +0200)
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>
include/linux/compiler.h

index 6d039ea376df93743bd0e488a66b07dd1bfd0ba5..39df1f16ffc0250cce32a425f11125190299d886 100644 (file)
 # 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: