ANDROID: mld: fix pragma usage with gcc

Use the recently added pragma only when compiling with clang, otherwise
the build breaks as reported by kernelci:

  drivers/net/wireless/intel/iwlwifi/mld/d3.c:1759: error: ignoring ‘#pragma clang loop’ [-Werror=unknown-pragmas]
   1759 | #pragma clang loop unroll(disable)
        |

Cc: Todd Kjos <tkjos@google.com>
Cc: Lee Jones <joneslee@google.com>
Fixes: 5737edf385 ("ANDROID: mld: temporary workaround to fortify break")
Reported-by: kernelci.org bot <bot@kernelci.org>
Closes: https://d.kernelci.org/i/maestro:f8504377b23bbd100dea49e0f68cf83014967f25
Change-Id: Ia311b7754821ca69f0ce3ee58a507126ad2491db
Signed-off-by: Carlos Llamas <cmllamas@google.com>
This commit is contained in:
Carlos Llamas authored and Treehugger Robot committed 2025-04-17 17:33:29 -07:00
1 parent df58e3ea8d
commit 02260686f0
1 file changed
+2
@@ -1756,7 +1756,9 @@ iwl_mld_send_proto_offload(struct iwl_mld *mld,
&solicited_addr);
/* TODO(b/411091992): remove pragma workaround once issue is resolved. */
#ifdef __clang__
#pragma clang loop unroll(disable)
#endif
for (j = 0; j < c; j++)
if (ipv6_addr_cmp(&nsc[j].dest_ipv6_addr,
&solicited_addr) == 0)