[PATCH 1/7] autofs-5.1.8 - fix missing include in hash.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fixes a build failure with the musl libc:
```
../include/hash.h:74:8: error: unknown type name '__always_inline'
   74 | static __always_inline uint32_t hash_64(uint64_t val, unsigned int bits)
      |        ^~~~~~~~~~~~~~~
```

We need to include stddef.h from linux-headers to ensure _always_inline
is always defined.

Bug: https://bugs.gentoo.org/828918
Tested-by: Yixun Lan <dlan@xxxxxxxxxx>
Signed-off-by: Sam James <sam@xxxxxxxxxx>
---
 CHANGELOG      | 3 +++
 include/hash.h | 1 +
 2 files changed, 4 insertions(+)

diff --git a/CHANGELOG b/CHANGELOG
index 3be6119..e4e3362 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+
+- musl: fix missing include in hash.h
+
 19/10/2021 autofs-5.1.8
 - add xdr_exports().
 - remove mount.x and rpcgen dependencies.
diff --git a/include/hash.h b/include/hash.h
index 2447f29..010acd7 100644
--- a/include/hash.h
+++ b/include/hash.h
@@ -3,6 +3,7 @@
 /* Fast hashing routine for ints,  longs and pointers.
    (C) 2002 Nadia Yvette Chambers, IBM */
 
+#include <linux/stddef.h>
 #include <sys/types.h>
 #include <stdint.h>
 
-- 
2.34.1




[Index of Archives]     [Linux Filesystem Development]     [Linux Ext4]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux