]> sourceware.org Git - lvm2.git/commitdiff
Hotfix usage of __builtin_unreachable()
authorZdenek Kabelac <zkabelac@redhat.com>
Tue, 26 Oct 2010 09:57:03 +0000 (09:57 +0000)
committerZdenek Kabelac <zkabelac@redhat.com>
Tue, 26 Oct 2010 09:57:03 +0000 (09:57 +0000)
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

index f9096cc3d2249afb4ae5eebf28fdaaab5692bbb3..47a90c58416a2105f55d994096e6e745f5c9f5a2 100644 (file)
@@ -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;
This page took 0.041031 seconds and 5 git commands to generate.