Closed rubenk closed 8 years ago
Hi Ruben,
Thanks for the patch. Normally we do these on the nbd-general list.
In the second patch:
+#if defined(__linux__)
I'm wondering if that would be better if it looked instead to see whether it was NOT on FreeBSD. I wouldn't want to break other systems by not defining _XOPEN_SOURCE
when needed, particularly if we don't know what they are.
The best solution would be a configure.ac
thing to see whether defining _XOPEN_SOURCE
makes things invisible and/or whether pread/pwrite is available without it.
Alex
Dear Alex,
Ah, sorry, next time I'll use the mailing list.
I agree that it will be better to use a configure.ac check for the second patch, I'll look into that.
I'll also look into if it wouldn't be better to set _XOPEN_SOURCE to some higher level than 500, like 700, since 500 is pretty restrictive.
@abligh strictly speaking, I've traditionally accepted patches through github pull requests too, mostly because redirecting people to a mailinglist where little (if any) review happens is not a very useful way to thank contributors.
The "little (if any)" bit of that seems to be changing now though, so yeah, it's probably time to change that policy. I'll update the README to that effect.
Closing this request, not because I don't want to accept the patch, but because it should go through the mailinglist.
Hey Wouter,
Here are some fixes to get NBD to build on FreeBSD again.