Compilation error on macOS #455
Labels
No labels
announcement
bug
build
CI
dependencies
documentation
duplicate
enhancement
experience feedback
feature request
github_actions
help wanted
install
invalid
Long-term
optimization
portability
question
target-specific
test issue
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-Cyan4973/xxHash#455
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Cyan4973
Oh wow, that one should have been obvious 🤦
Thanks for the report @rex4539 !
Yes, I can confirm it.
The bigger lesson here is that our test system has missed that case.
The fix is likely obvious, but I don't get why the issue would trigger specifically on OS-X.
Maybe we need to add an OS-X target into our CI. TravisCI supports it.
Not a bad idea.
This is why it didn't show up on Windows and Linux:

Is there any specific reason that we have this conditional? All of these platforms have unistd.h.
Well, it seems that the whole point of this paragraph is to
#define XUM_PLATFORM_POSIX_VERSION,and if
#include <unistd.h>doesn't achieve that for macOS,it feels logical to give it a different path.
If the objective of this paragraph is not clear, then maybe it should be clarified in a code comment.
The real issue here is that the side-effect that
<unistd.h>also includes<stddef.h>when compiled on Linux should not be relied upon.I guess this is only an issue now that the single source file
xxhsum.cget split into multiple modules, and now the dependency chain must be setup correctly.