-
Notifications
You must be signed in to change notification settings - Fork 228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fallback to compiler defines when __BYTE_ORDER is not available #513
Conversation
After how |
Done, thanks! |
Remove this too:
|
I missed that - updated and retested. |
This fix is required on OpenBSD/sparc64 to unbreak borgbackup 1.2.2 at runtime, see borgbackup/borg#6149 (comment) for details. |
msgpack-python 1.0.4 regression tests pass 100% with and without this fix on OpenBSD/sparc64. Passing tests but failing runtime consumers at the same time suggests a lack of endianess coverage. |
Can you elaborate why? This include is required by ntohs(3) later in the same file: Accidentially, it seems, this builds fine on OpenBSD, but breaks at least in Ubuntu 20.04, see |
On some systems (I tested it on Oracle Solaris and FreeBSD),
__BYTE_ORDER
,__LITTLE_ENDIAN
and__BIG_ENDIAN
fromarpa/inet.h
are not available, which can cause failures on big endian systems (because little endian is the default). This adds a fallback to common compiler defines in those cases.Addresses issues raised in #495.