Index: bind-9.18.2/contrib/dlz/modules/include/dlz_minimal.h =================================================================== --- bind-9.18.2.orig/contrib/dlz/modules/include/dlz_minimal.h +++ bind-9.18.2/contrib/dlz/modules/include/dlz_minimal.h @@ -27,6 +27,7 @@ #include #include +#include #include #include @@ -85,6 +86,25 @@ typedef uint32_t dns_ttl_t; var = _u.v; \ } while (0) + +#if !defined(__has_attribute) +#define __has_attribute(x) 0 +#endif /* if !defined(__has_attribute) */ + +#if __GNUC__ >= 7 || __has_attribute(fallthrough) +#define FALLTHROUGH __attribute__((fallthrough)) +#else +/* clang-format off */ +#define FALLTHROUGH do {} while (0) /* FALLTHROUGH */ +/* clang-format on */ +#endif + +#ifdef __GNUC__ +#define UNREACHABLE() __builtin_unreachable() +#else +#define UNREACHABLE() abort() +#endif + /* opaque structures */ typedef void *dns_sdlzlookup_t; typedef void *dns_sdlzallnodes_t;