[PATCH] firmware-utils: fix compilation with macOS
Paul Spooren
mail at aparcar.org
Mon Feb 28 00:53:26 PST 2022
> On 28. Feb 2022, at 09:51, Rosen Penev <rosenp at gmail.com> wrote:
>
> On Mon, Feb 28, 2022 at 12:43 AM Paul Spooren <mail at aparcar.org> wrote:
>>
>>
>>
>>> On 28. Feb 2022, at 08:34, Rosen Penev <rosenp at gmail.com> wrote:
>>>
>>> __bswap_32 is a GNU extension.
>>>
>>> Signed-off-by: Rosen Penev <rosenp at gmail.com>
>>> —
>>
>> Seems to fix the compile issue on my Mac.
>>
>> Acked-by: Paul Spooren <mail at aparcar.org>
>>
>> If people change things in tools/, please use GitHub PRs. I added a CI to compile check changes on Ubuntu/macOS since breakage is a recurring issue.
> The issue is that it would have to be implemented as a patch file,
> which is bad form to be merged.
The bump (73dfc9e7d9) could have been a PR ergo triggering the CI.
>>
>>> 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
>>>
>>>
>>> _______________________________________________
>>> openwrt-devel mailing list
>>> openwrt-devel at lists.openwrt.org
>>> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list