shell.c compilation error when built with SQLITE_OMIT_AUTHORIZATION defined

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

shell.c compilation error when built with SQLITE_OMIT_AUTHORIZATION defined

Cameron, Jonathan

There's usage of sqlite3_set_authorizer within shell.c that's not wrapped with the test for if SQLITE_OMIT_AUTHORIZATION is defined that prevents compilation of the shell.c if the configuration includes this define.

I've provided a diff with a fix below:

$ git diff
diff --git a/shell.c b/shell.c
index 053180c..3a3b8b4 100644
--- a/shell.c
+++ b/shell.c
@@ -8460,10 +8460,12 @@ sqlite3expert *sqlite3_expert_new(sqlite3 *db, char **pzErrmsg){
     rc = idxCreateVtabSchema(pNew, pzErrmsg);
   }

+#ifndef SQLITE_OMIT_AUTHORIZATION
   /* Register the auth callback with dbv */
   if( rc==SQLITE_OK ){
     sqlite3_set_authorizer(pNew->dbv, idxAuthCallback, (void*)pNew);
   }
+#endif

   /* If an error has occurred, free the new object and reutrn NULL. Otherwise,
   ** return the new sqlite3expert handle.  */

Thanks,
Jonathan

________________________________

CONFIDENTIALITY NOTICE: This email and any attachments are for the sole use of the intended recipient(s) and contain information that may be Garmin confidential and/or Garmin legally privileged. If you have received this email in error, please notify the sender by reply email and delete the message. Any disclosure, copying, distribution or use of this communication (including attachments) by someone other than the intended recipient is prohibited. Thank you.
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users