Message ID | 20220228073426.2584632-1-rosenp@gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | firmware-utils: fix compilation with macOS | expand |
> On 28. Feb 2022, at 08:34, Rosen Penev <rosenp@gmail.com> wrote: > > __bswap_32 is a GNU extension. > > Signed-off-by: Rosen Penev <rosenp@gmail.com> > — Seems to fix the compile issue on my Mac. Acked-by: Paul Spooren <mail@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. > 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@lists.openwrt.org > https://lists.openwrt.org/mailman/listinfo/openwrt-devel
On Mon, Feb 28, 2022 at 12:43 AM Paul Spooren <mail@aparcar.org> wrote: > > > > > On 28. Feb 2022, at 08:34, Rosen Penev <rosenp@gmail.com> wrote: > > > > __bswap_32 is a GNU extension. > > > > Signed-off-by: Rosen Penev <rosenp@gmail.com> > > — > > Seems to fix the compile issue on my Mac. > > Acked-by: Paul Spooren <mail@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. > > > 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@lists.openwrt.org > > https://lists.openwrt.org/mailman/listinfo/openwrt-devel >
> On 28. Feb 2022, at 09:51, Rosen Penev <rosenp@gmail.com> wrote: > > On Mon, Feb 28, 2022 at 12:43 AM Paul Spooren <mail@aparcar.org> wrote: >> >> >> >>> On 28. Feb 2022, at 08:34, Rosen Penev <rosenp@gmail.com> wrote: >>> >>> __bswap_32 is a GNU extension. >>> >>> Signed-off-by: Rosen Penev <rosenp@gmail.com> >>> — >> >> Seems to fix the compile issue on my Mac. >> >> Acked-by: Paul Spooren <mail@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@lists.openwrt.org >>> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
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);
__bswap_32 is a GNU extension. Signed-off-by: Rosen Penev <rosenp@gmail.com> --- src/avm-wasp-checksum.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)