]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
resolv: Fix tst-resolv-short-response for older GCC (bug 32042)
authorFlorian Weimer <fweimer@redhat.com>
Thu, 1 Aug 2024 08:46:10 +0000 (10:46 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Thu, 1 Aug 2024 19:07:48 +0000 (21:07 +0200)
Previous GCC versions do not support the C23 change that
allows labels on declarations.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
resolv/tst-resolv-short-response.c

index be354ae1c7f2a81a6616196f9913ac3073d5a173..9b06b0c1762f860cdc7ece81df06bbd3574e5faf 100644 (file)
@@ -33,8 +33,10 @@ response (const struct resolv_response_context *ctx,
     {
     case 0:
       /* First server times out.  */
-      struct resolv_response_flags flags = {.rcode = rcode};
-      resolv_response_init (b, flags);
+      {
+        struct resolv_response_flags flags = {.rcode = rcode};
+        resolv_response_init (b, flags);
+      }
       break;
     case 1:
       /* Second server sends reply.  */