From 683f33139e27b971b67ca76abee5eed9a4461e34 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Tue, 26 Oct 2010 09:57:03 +0000 Subject: [PATCH] Hotfix usage of __builtin_unreachable() It's quite new feature which is not supported by older compilers. So until some better macros are introduced into LVM code - hotfix current compilation problems and compile this code only for __clang__ defining compilers. --- daemons/clvmd/clvmd.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/daemons/clvmd/clvmd.c b/daemons/clvmd/clvmd.c index f9096cc3d..47a90c584 100644 --- a/daemons/clvmd/clvmd.c +++ b/daemons/clvmd/clvmd.c @@ -491,7 +491,9 @@ int main(int argc, char *argv[]) DEBUGLOG("Can't initialise cluster interface\n"); log_error("Can't initialise cluster interface\n"); child_init_signal(DFAIL_CLUSTER_IF); +#ifdef __clang__ __builtin_unreachable(); +#endif } DEBUGLOG("Cluster ready, doing some more initialisation\n"); @@ -508,7 +510,9 @@ int main(int argc, char *argv[]) newfd = malloc(sizeof(struct local_client)); if (!newfd) { child_init_signal(DFAIL_MALLOC); +#ifdef __clang__ __builtin_unreachable(); +#endif } newfd->fd = local_sock; -- 2.43.5