Skip to content

fix BYTE_ORDER, BIG_ENDIAN, and LITTLE_ENDIAN macros missing on Solaris - #2087

Open
kulikjak wants to merge 2 commits into
esnet:masterfrom
kulikjak:solaris-endianness
Open

kulikjak wants to merge 2 commits into
esnet:masterfrom
kulikjak:solaris-endianness

Conversation

@kulikjak

@kulikjak kulikjak commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Hi! On Solaris, the BYTE_ORDER, BIG_ENDIAN, or LITTLE_ENDIAN macros are not defined, which makes e.g. #if BYTE_ORDER == BIG_ENDIAN not work as expected.

This PR defines all three those based on Solaris specific _BIG_ENDIAN and _LITTLE_ENDIAN macros.

I found this on Oracle Solaris when cross testing between SPARC and Intel systems (each having different endianness). Since I am unsure whether e.g. Illumos or other OpenSolaris forks also lack these definitions, I added the if !defined guards just to be sure I don't break them.

This was tested with iperf3 3.22.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant