Adapt HAVE_GETHOSTUUID conditional for UIKit for macOS
Attempting to use SQLite version 3.29.0 amalgamation in a [Catalyst](
https://developer.apple.com/ipad-apps-for-mac/) based project -- targeting
UIKit for macOS -- fails with the error "'gethostuuid' is unavailable: not
available on UIKit for macOS"
Thanks for the response. Just to clarify, this is separate from the
`warning "gethostuuid() is disabled."` exuded from the else portion of the
conditional (when targeting iOS). When targeting UIKit for macOS, the
conditional gets into the if portion because TARGET_OS_UIKITFORMAC is not
included as an exemption (this is the adjustment I was suggesting with my
This is an error and causes a build failure because the HAVE_GETHOSTUUID is
set to 1 (so the gethostuuid() paths are included later on in the code),
even though it's not available on UIKit for macOS.
>It looks like you're building SQLite from source (why? it's already
as a dynamic library on Apple platforms)
While the dynamic library on Apple doesn't fail with the same error, this
issue does impact any custom builds/configurations of SQLite being built to
target the Apple ecosystem.
I can provide a test project that displays the error with Xcode 11 beta +
macOS 10.15 beta if that would be helpful.