Building 3.22.0 for vxWorks fails

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Building 3.22.0 for vxWorks fails

Andy Ling-2
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 Mimecast.
For more information please visit

sqlite-users mailing list
[hidden email]