Found this SO about gethostuuid depreciated
but it's not helping me much in this case.
Target is iOS6.0, at compil time in sqlite3.c (v3.7.2):
static int proxyGetHostID(unsigned char *pHostID, int *pError){
struct timespec timeout = {1, 0}; /* 1 sec timeout */
assert(PROXY_HOSTIDLEN == sizeof(uuid_t));
memset(pHostID, 0, PROXY_HOSTIDLEN);
if( gethostuuid(pHostID, &timeout) ){
=>> warning: 'gethostuuid' is deprecated: first deprecated in iOS 5.0 - gethostuuid() is no longer supported
int err = errno;
if( pError ){
*pError = err;
}
return SQLITE_IOERR;
}
#ifdef SQLITE_TEST
/* simulate multiple hosts by creating unique hostid file paths */
if( sqlite3_hostid_num != 0){
pHostID[0] = (char)(pHostID[0] + (char)(sqlite3_hostid_num & 0xFF));
}
#endif
return SQLITE_OK;
}
- I understand that gethostuuid has been deprecated in iOS 5.0.
- And that the API gethostuuid() has been removed and will not be accepted for submission to the store, regardless of the targeted OS. For existing apps running on iOS 7, the function will return a uuid_t representation of the vendor identifier (-[UIDevice identifierForVendor]).
How to replace the call to gethostuuid
in sqlite3.c
?