SQLite 3.24.0 fails to build on Solaris 9 (a.k.a. Solaris 2.9) due to not finding fchmod, fchown, readlink, lstat, usleep, struct timeval, and gettimeofday.

To correct, do not #define _XOPEN_SOURCE. There's already a check for Mac OS X, so I would suggest extending the check to also exclude Solaris 9 with something like the following:

#if !defined(_XOPEN_SOURCE) && !defined(__DARWIN__) && !defined(__APPLE) && \
    !(defined(__sun) && defined(__SVR4))
#  define _XOPEN_SOURCE 600
#endif

This check isn't version-specific. There doesn't appear to be a guaranteed macro for that purpose. Sun Studio offers macros like _SunOS_5_9 (meaning Solaris 9), but gcc does not. Though it's a bit silly for me to obsess over versions since I don't know exactly which versions of Solaris hide the relevant functions and structs if _XOPEN_SOURCE is defined. I only have access to Solaris 9, and by "access" I mean I have a copy of /usr/include and such, not a computer I can log in to. Just enough to do a cross-compile, which succeeds with the above change.

More investigation is needed to figure out how to make SQLite build for Solaris 9 without breaking other Solaris/SunOS platforms.

--
Andy Goth | <andrew.m.goth/at/gmail/dot/com>
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to