Closed mistydemeo closed 4 years ago
thanks for reporting this. I thought I'd already fixed this one, but I must not have been able to figure it out. Do you have any insight into autoconf, and how I might catch this? I've always found autoconf to be like something Serverus Snape would teach.
hmm... maybe I can just check for osx at compile time? I did think I was doing that.
Yeah, I think checking it in autoconf is going to be... thorny? I have about the same experiences with trying to make autoconf checks like that more complex.
I think scoping the check to #ifdef __linux__
would be more appropriate than checking for OS X; since it's a non-POSIX API, any other functions by the same name in other non-OS X OSs are probably also going to end up being incompatible.
I've discovered there's an #ifdef APPLE, which I'm hoping will fix it. It's passing on travis-ci, but then it was before too. It's in the 4.23 release.
I tend to find autoconf is, to paraphrase Churchill, the worst build system there is, except for all the other ones I've seen.
Thanks again for reporting this.
Thanks! I caught a handful of very minor issues with that commit, so I opened #2 to fix that.
Both macOS and Linux provide non-POSIX functions named
getxattr
/setxattr
, but they're not compatible with each other. At a glance, they seem to be mostly similar, but the Mac one takes extraposition
andoptions
parameters: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/getxattr.2.htmllibUseful's configure script just checks for whether the function exists and assumes it's usable. That causes compilation to fail on Macs unless
--disable-xattr
is explicitly passed. Since it looks like it's specifically looking for the Linux function by this name, it's probably a good idea to make using it dependent on the OS too.