]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
lib: remove usage of `sys/cdefs.h`
authorSaleem Abdulrasool <abdulras@google.com>
Fri, 20 Aug 2021 18:20:08 +0000 (18:20 +0000)
committerMark Wielaard <mark@klomp.org>
Fri, 27 Aug 2021 15:05:44 +0000 (17:05 +0200)
This header is a BSD header that is also available in glibc.  However,
this is a not a standard C header and was used for `__CONCAT`.  Because
this is not a standard header, not all libc implementations provide the
header.  Remove the usage of the header and always use the previously
fallback path.  This is needed in order to build with musl.

Signed-off-by: Saleem Abdulrasool <abdulras@google.com>
lib/ChangeLog
lib/fixedsizehash.h

index 44366fec9b91ca302599489521e995913769d9a3..a95f80417bab5806fc7234c7300cf524ecee6636 100644 (file)
@@ -1,3 +1,8 @@
+2021-08-20  Saleem Abdulrasool  <abdulras@google.com>
+
+       * fixedsizehash.h: Remove sys/cdefs.h include. Unconditionally
+       define STROF and CONCAT macros.
+
 2021-07-28  Mark Wielaard  <mark@klomp.org>
 
        * system.h (reallocarray): New static inline fallback function.
index dac2a5f5592f486dfb1b23897bdaa97951e52788..f333ad9940a73e824fd185b721ac6b12b5a13b0d 100644 (file)
 #include <errno.h>
 #include <stdlib.h>
 #include <string.h>
-#include <sys/cdefs.h>
 
 #include <system.h>
 
-#ifdef __CONCAT
-#define CONCAT(t1,t2) __CONCAT (t1,t2)
-#else
 #define STROF(t2) t2
 #define CONCAT_EXPANDED(t1,t2) t1 ## t2
 #define CONCAT(t1,t2) CONCAT_EXPANDED(t1,t2)
-#endif
 
 /* Before including this file the following macros must be defined: