firmware-utils: fix compilation with macOS
authorRosen Penev <rosenp@gmail.com>
Mon, 28 Feb 2022 07:34:26 +0000 (23:34 -0800)
committerStijn Tintel <stijn@linux-ipv6.be>
Mon, 28 Feb 2022 10:55:57 +0000 (12:55 +0200)
__bswap_32 is a GNU extension.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Acked-by: Paul Spooren <mail@aparcar.org>
src/avm-wasp-checksum.c

index 8c112f317b3212a3d54258c1987d62eee30f9f9a..41a425eecdfc8ed52e2873f5c848e391fb6f4c8f 100644 (file)
@@ -156,7 +156,7 @@ int main(int argc, char *argv[])
                }
        }
        if (model == MODEL_X490)
-               crc = __bswap_32(crc);
+               crc = bswap_32(crc);
        fwrite(&crc, sizeof(uint32_t), 1, out_fp);
        if (ferror(out_fp)) {
                fprintf(stderr, "Error writing checksum to output file: %s\n", outfile);