[PATCH] firmware-utils: fix compilation with macOS

Rosen Penev rosenp at gmail.com
Sun Feb 27 23:34:26 PST 2022


__bswap_32 is a GNU extension.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 src/avm-wasp-checksum.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/avm-wasp-checksum.c b/src/avm-wasp-checksum.c
index 8c112f3..41a425e 100644
--- a/src/avm-wasp-checksum.c
+++ b/src/avm-wasp-checksum.c
@@ -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);
-- 
2.35.1




More information about the openwrt-devel mailing list