I decided it was about time we updated our version 3.8 sqlite to something a 
bit newer.
So I have just tried building the 3.22.0 amalgamation for VxWorks and it fails 
to compile with the following error

sqlite3.c:31215: error: 'geteuid' undeclared here (not in a function)

It looks like the geteuid function is only called in robustFchown and only if 
HAVE_FCHOWN is defined.
So changing the few lines around 31215 so they look like the following seems to 
fix things.

#if defined(HAVE_FCHOWN)
  { "fchown",       (sqlite3_syscall_ptr)fchown,          0 },
  { "geteuid",      (sqlite3_syscall_ptr)geteuid,         0 },
  { "fchown",       (sqlite3_syscall_ptr)0,               0 },
  { "geteuid",      (sqlite3_syscall_ptr)0,               0 },
#define osFchown    ((int(*)(int,uid_t,gid_t))aSyscall[20].pCurrent)
#define osGeteuid   ((uid_t(*)(void))aSyscall[21].pCurrent)


Andy Ling
This email has been scanned for email related threats and delivered safely by 
For more information please visit http://www.mimecast.com

sqlite-users mailing list

Reply via email to