make TDB can compile
This commit is contained in:
parent
5f90bae8bb
commit
54ca6c4e8c
|
@ -30,20 +30,5 @@ int tdbGnrtFileID(const char *fname, uint8_t *fileid, bool unique) {
|
||||||
((uint64_t *)fileid)[2] = taosRand();
|
((uint64_t *)fileid)[2] = taosRand();
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int tdbGetFileSize(const char *fname, int pgSize, SPgno *pSize) {
|
|
||||||
struct stat st;
|
|
||||||
int ret;
|
|
||||||
int64_t file_size = 0;
|
|
||||||
ret = taosStatFile(fname, &file_size, NULL);
|
|
||||||
if (ret != 0) {
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
ASSERT(file_size % pgSize == 0);
|
|
||||||
|
|
||||||
*pSize = file_size / pgSize;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
|
@ -30,8 +30,6 @@ extern "C" {
|
||||||
|
|
||||||
int tdbGnrtFileID(const char *fname, uint8_t *fileid, bool unique);
|
int tdbGnrtFileID(const char *fname, uint8_t *fileid, bool unique);
|
||||||
|
|
||||||
int tdbGetFileSize(const char *fname, int pgSize, SPgno *pSize);
|
|
||||||
|
|
||||||
#define TDB_REALLOC(PTR, SIZE) \
|
#define TDB_REALLOC(PTR, SIZE) \
|
||||||
({ \
|
({ \
|
||||||
void *nPtr; \
|
void *nPtr; \
|
||||||
|
|
Loading…
Reference in New Issue