Skip to content

Commit

Permalink
networking/test/chksum.c: fix undefined-function error.
Browse files Browse the repository at this point in the history
include/networking.h defines __chksum_arm_simd conditionally, under
`#if (__arm__ && __ARM_NEON)`. But the test program refers to it under
just `#if __arm__`. So if you have __arm__ but not __ARM_NEON, you get
the reference, but not the definition to go with it, causing a link
failure.

Fixed by making the `#if`s in the test match the ones in the header.
  • Loading branch information
statham-arm authored and blapie committed Jan 24, 2025
1 parent 3752b98 commit 6dd6d5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions networking/test/chksum.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ static struct
{
{ checksum_simple, "simple"},
{ __chksum, "scalar"},
#if __arm__
#if __arm__ && __ARM_NEON
{ __chksum_arm_simd, "simd" },
#elif __aarch64__
#elif __aarch64__ && __ARM_NEON
{ __chksum_aarch64_simd, "simd" },
#endif
{ NULL, NULL}
Expand Down

0 comments on commit 6dd6d5a

Please sign in to comment.