raspberrypi / picotool

BSD 3-Clause "New" or "Revised" License
566 stars 100 forks source link

fix FreeBSD build #118

Open 0xDRRB opened 2 weeks ago

0xDRRB commented 2 weeks ago

FreeBSD (14.1 RELEASE) compilation fails because the macros in portable_endian.h (be16toh, le16toh, etc) already exist in sys/endian.h.

This PR fixes the problem by differentiating FreeBSD from NetBSD/DragonFly and simply including sys/endian.h without defining anything else.

lurch commented 2 weeks ago

Can you change the base branch to develop please?

will-v-pi commented 2 weeks ago

Would a better fix be to treat FreeBSD the same as OpenBSD, as suggested by this comment?

lurch commented 1 week ago

Superseded by #133 ?