This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch main in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=c4be7df409cf60132aaf11ed74cbb7909f0fdcdf commit c4be7df409cf60132aaf11ed74cbb7909f0fdcdf Author: Guillem Jover <[email protected]> AuthorDate: Mon Apr 24 23:37:12 2023 +0200 lib: Define __has_include fallback if the compiler does not support it This way we can use it unconditionally in the code. --- lib/compat/compat.h | 4 ++++ lib/dpkg/macros.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/lib/compat/compat.h b/lib/compat/compat.h index b5c054540..861299c8a 100644 --- a/lib/compat/compat.h +++ b/lib/compat/compat.h @@ -47,6 +47,10 @@ #define __has_attribute(x) 0 #endif +#ifndef __has_include +#define __has_include(x) 0 +#endif + #ifdef __GNUC__ #define LIBCOMPAT_GCC_VERSION (__GNUC__ << 8 | __GNUC_MINOR__) #else diff --git a/lib/dpkg/macros.h b/lib/dpkg/macros.h index 5c609f23f..1386554e9 100644 --- a/lib/dpkg/macros.h +++ b/lib/dpkg/macros.h @@ -33,6 +33,10 @@ /* Language definitions. */ +#ifndef __has_include +#define __has_include(x) 0 +#endif + /* Supported since clang 1.0. */ #ifndef __has_warning #define __has_warning(w) (0) -- Dpkg.Org's dpkg

