SQLite Android Bindings
Ticket Change Details
Not logged in
Overview

Artifact ID: 0afc464dd11fa2298d46cbd1116954187a50ed75
Ticket: 28d442a2c39bd54683a6ff74467336939e305a7e
Build error when SQLITE_ENABLE_BATCH_ATOMIC_WRITE is set because of ambiguous cast
User & Date: anonymous 2018-09-05 12:50:23
Changes

  1. Change foundin to "latest"
  2. Change icomment to:

    Before Android NDK r17, there was only one ioctl() function defined. int ioctl(int __fd, int __request, ...);

    However, since Android NDK r17, another one has been added: int ioctl(int __fd, unsigned __request, ...)

    When compiling SQLite with SQLITE_ENABLE_BATCH_ATOMIC_WRITE this will produce a build error since clang does not know which ioctl() function to cast, since sqlite2_syscall_ptr is defined as: typedef void (*sqlite3_syscall_ptr)(void);

    ==== [x86_64] Compile : sqliteX <= sqlite3.c /home/mathieu/Documents/Sources/Temp/SQlite/sqlite/sqlite3/src/main/jni/sqlite/sqlite3.c:32184:43: error: address of overloaded function 'ioctl' is ambiguous { "ioctl", (sqlite3_syscall_ptr)ioctl, 0 }, ^~~~~ /home/mathieu/Android/NDK/android-ndk-r17b/sysroot/usr/include/bits/ioctl.h:57:5: note: candidate function has different number of parameters (expected 0 but has 2) int ioctl(int __fd, unsigned __request, ...) __overloadable __enable_if(1, "") __RENAME(ioctl); ^ /home/mathieu/Android/NDK/android-ndk-r17b/sysroot/usr/include/bits/ioctl.h:36:5: note: candidate function has different number of parameters (expected 0 but has 2) int ioctl(int __fd, int __request, ...); ^ /home/mathieu/Documents/Sources/Temp/SQlite/sqlite/sqlite3/src/main/jni/sqlite/sqlite3.c:32184:22: error: initializer element is not a compile-time constant { "ioctl", (sqlite3_syscall_ptr)ioctl, 0 }, ^~~~~~~~~~~~~~~~~~~~~~~~~~ 2 errors generated. make: *** /home/mathieu/Documents/Sources/Temp/SQlite/sqlite/sqlite3/build/intermediates/ndkBuild/release/obj/local/x86_64/objs/sqliteX/sqlite3.o Error 1 ====

  3. Change login to "anonymous"
  4. Change mimetype to "text/x-fossil-plain"
  5. Change private_contact to "6ae8e4e99f463d5364ed5168b893c32b24d7ca5f"
  6. Change severity to "Severe"
  7. Change status to "Open"
  8. Change title to:

    Build error when SQLITE_ENABLE_BATCH_ATOMIC_WRITE is set because of ambiguous cast

  9. Change type to "Code_Defect"