Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qtjsondb build failed for android

Qtjsondb build failed for android

Scheduled Pinned Locked Moved Mobile and Embedded
2 Posts 2 Posters 1.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vladstelmahovsky
    wrote on last edited by
    #1

    Hi

    when trying to build qtjsondb for android, got the error:

    jsondbpartition.cpp:62:25: fatal error: sys/statvfs.h: No such file or directory

    how to fix it?

    thanks,
    Vlad

    1 Reply Last reply
    0
    • A Offline
      A Offline
      adeblois
      wrote on last edited by
      #2

      in jsondbpartition.cpp, the following change should resolve the error:

      << #include <sys/statvfs.h>

      #ifndef ANDROID

      include <sys/statvfs.h>

      #else

      include <sys/vfs.h>

      define statvfs statfs

      #endif

      I also ran into some other issues during the build:
      (Changes could be wrapped with #ifdef ANDROID...)

      qjsondbmodelutils.cpp failed due to "ambiguous overload for 'operator <'. Making the following change resolved that:

      //return (dLhs->directions[i] ? lhsValue < rhsValue : rhsValue < lhsValue);
      return (dLhs->directions[i] ? rhsValue > lhsValue : lhsValue > rhsValue);

      1. src/daemon/main.cpp failed since lockf and F_TLOCK are not defined.

        //if (lockf(lfp, F_TLOCK, 0)<0)
        if (fcntl(lfp, 1, 0)<0)

      2. dbserver.cpp failed since '::getpwent': wasn't defined.

        //#if defined(Q_OS_UNIX)
        #if defined(Q_OS_UNIX) && !defined(ANDROID)

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved