]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: pools: fix build error on clang with inline vs forceinline
authorWilly Tarreau <w@1wt.eu>
Sat, 12 Aug 2023 17:58:17 +0000 (19:58 +0200)
committerWilly Tarreau <w@1wt.eu>
Sat, 12 Aug 2023 17:58:17 +0000 (19:58 +0200)
clang is more picky than gcc regarding duplicate "inline". The functions
declared with "forceinline" don't need to have "inline" since it's already
in the macro.

src/pool.c

index 7cb71d00fc248f49b146d339fbe7ff9b0e928272..341c3b4d86bf5782903e0c8b3d29fd2ca8aff644 100644 (file)
@@ -115,7 +115,7 @@ static int(*_malloc_trim)(size_t) = NULL;
  * allocated on one thread and released on another one. Thus only the
  * pointer is usable.
  */
-static inline forceinline unsigned int pool_pbucket(const void *ptr)
+static forceinline unsigned int pool_pbucket(const void *ptr)
 {
        return ptr_hash(ptr, CONFIG_HAP_POOL_BUCKETS_BITS);
 }
@@ -123,7 +123,7 @@ static inline forceinline unsigned int pool_pbucket(const void *ptr)
 /* returns the pool hash bucket to use for the current thread. This should only
  * be used when no pointer is available (e.g. count alloc failures).
  */
-static inline forceinline unsigned int pool_tbucket(void)
+static forceinline unsigned int pool_tbucket(void)
 {
        return tid % CONFIG_HAP_POOL_BUCKETS;
 }