-
Notifications
You must be signed in to change notification settings - Fork 38
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
Fix various portability issues #202
Conversation
After removing
Those autoconf statements redirect the code through a Cannot confirm whether the darwin compilation builds at the moment. |
If setxattrs fail we just don't test xattrs. Not great, but also not a huge issue. Signed-off-by: Alexander Larsson <[email protected]>
rpl_malloc is meant to be supplied manually by the code if, but we don't do this atm. I don't think we depend on the gnu malloc(0) behaviour tho, so lets just drop these. |
049d3d0
to
0c63ee0
Compare
|
This will have to be done by someone with darwin then.
Fixed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can confirm that both builds with musl or clang compile successfully.
Although it might be an idea to add this to libcomposefs/Makefile-lib.am
so the current version gets set as SONAME:
libcomposefs_la_LDFLAGS = -release @VERSION@
The version number of the release is more of a human consumable moniker. We don't want to tread it as an actual soname. For example, we want to be able to go to 1.0.0 without breaking the library ABI. We should probably have some minor soname changes tho.. |
This is a glibc specific extension. We were already using the BSD alternative err()/errx() in some places, and that seems more widely suported, so lets just use that everywhere. Most of the conversions are trivial: * error(EXIT_FAILURE, errno, => err(EXIT_FAILURE, * error(EXIT_FAILURE, 0, => errx(EXIT_FAILURE, * error(0, 0, => fprintf(stderr, * error(0, errno, => perror( Although in some places we had to set errno to be able to use err(). Signed-off-by: Alexander Larsson <[email protected]>
This member should be little endian, the matching kernel struct has: __le64 data_size; /* size of file the Merkle tree is built over */ So, rename from data_size_be to data_size_le. Signed-off-by: Alexander Larsson <[email protected]>
Signed-off-by: Alexander Larsson <[email protected]>
Signed-off-by: Alexander Larsson <[email protected]>
To use these you should define your own rpm_malloc, and rpl_realloc, which we don't. Also, we're not relying on zero allocations anyway, so we don't need these. Signed-off-by: Alexander Larsson <[email protected]>
Signed-off-by: Alexander Larsson <[email protected]>
f9df66f
to
ae3a021
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This should fix the issues pointed out in #200 (although I never tried to actually build on any other os).