Skip to content
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

Allows eepdump and eepmake to be compiled on Mac OS #75

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nekuz0r
Copy link

@nekuz0r nekuz0r commented Nov 19, 2020

Mac OS X doesn't provide endian.h.
It's only required for the be32toh and htobe32 utility functions.
Mac OS X provides similare functions in libkern/OSByteOrder.h.

Respectively OSSwapHostToBigInt32 for htobe32 and OSSwapBigToHostInt32 for be32toh.

This adds a preprocessor condition to include endian.h on non apple system and to include libkern/OSByteOrder.h as well as defining to macro to provide htobe32 and be32toh on apple plateform.

Mac OS X doesn't provide `endian.h`.
It's only required for the `be32toh` and `htobe32` utility functions.
Mac OS X provides similare functions in `libkern/OSByteOrder.h`.

Respectively `OSSwapHostToBigInt32` for `htobe32` and `OSSwapBigToHostInt32` for `be32toh`.

This adds a preprocessor condition to include `endian.h` on non apple system and to include `libkern/OSByteOrder.h` as well as defining to macro to provide `htobe32` and `be32toh` on apple plateform.
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