diff --git a/source/libs/tdb/src/db/tdbEnv.c b/source/libs/tdb/src/db/tdbEnv.c index 0b27796790682623ea6dbb7af3147b2fef2c56e5..595a90a5ada86da48dbbfa13bea1f00c74f2366b 100644 --- a/source/libs/tdb/src/db/tdbEnv.c +++ b/source/libs/tdb/src/db/tdbEnv.c @@ -48,7 +48,7 @@ int tdbEnvOpen(const char *rootDir, int pageSize, int cacheSize, STEnv **ppEnv) pEnv->jfd = -1; - ret = tdbPCacheOpen(pageSize, cacheSize, 0, &(pEnv->pCache)); + ret = tdbPCacheOpen(pageSize, cacheSize, sizeof(SPageHandle), &(pEnv->pCache)); if (ret < 0) { return -1; } diff --git a/source/libs/tdb/src/inc/tdbBtree.h b/source/libs/tdb/src/inc/tdbBtree.h index bcbe1970a11b1d270eca41ef8f7c2c26dce30659..8b0fadd507872ef4a29f3597500640b167bff9ef 100644 --- a/source/libs/tdb/src/inc/tdbBtree.h +++ b/source/libs/tdb/src/inc/tdbBtree.h @@ -22,7 +22,7 @@ extern "C" { typedef struct SBTree SBTree; typedef struct SBtCursor SBtCursor; -typedef struct SBtPage SBtPage; +typedef struct SBtPage SBtPage; struct SBtCursor { SBTree * pBt; diff --git a/source/libs/tdb/src/inc/tdbPage.h b/source/libs/tdb/src/inc/tdbPage.h index 608f517aa7db2e750df0538b5faa99e592f9934b..350fb29b64c83ef92f4f5528f0bb6f2192d3bc17 100644 --- a/source/libs/tdb/src/inc/tdbPage.h +++ b/source/libs/tdb/src/inc/tdbPage.h @@ -29,6 +29,7 @@ typedef struct __attribute__((__packed__)) { } SPageHdr; typedef struct { + void * pData; SPageHdr *pPageHdr; void * pAMHdr; u16 * aCellIdx;