fix: fix odr violation

This commit is contained in:
Liu Jicong 2021-08-12 11:53:53 +08:00
parent 8826abf866
commit 735e6c1ea1
3 changed files with 8 additions and 3 deletions

View File

@ -26,6 +26,9 @@
#include "tlocale.h" #include "tlocale.h"
#include "ttimezone.h" #include "ttimezone.h"
// TSDB
bool tsdbForceKeepFile = false;
// cluster // cluster
char tsFirst[TSDB_EP_LEN] = {0}; char tsFirst[TSDB_EP_LEN] = {0};
char tsSecond[TSDB_EP_LEN] = {0}; char tsSecond[TSDB_EP_LEN] = {0};

View File

@ -18,6 +18,9 @@
#define TSDB_FS_VERSION 0 #define TSDB_FS_VERSION 0
// ================== TSDB global config
extern bool tsdbForceKeepFile;
// ================== CURRENT file header info // ================== CURRENT file header info
typedef struct { typedef struct {
uint32_t version; // Current file system version (relating to code) uint32_t version; // Current file system version (relating to code)
@ -109,4 +112,4 @@ static FORCE_INLINE int tsdbUnLockFS(STsdbFS* pFs) {
return 0; return 0;
} }
#endif /* _TD_TSDB_FS_H_ */ #endif /* _TD_TSDB_FS_H_ */

View File

@ -38,7 +38,6 @@ static int tsdbProcessExpiredFS(STsdbRepo *pRepo);
static int tsdbCreateMeta(STsdbRepo *pRepo); static int tsdbCreateMeta(STsdbRepo *pRepo);
// For backward compatibility // For backward compatibility
bool tsdbForceKeepFile = false;
// ================== CURRENT file header info // ================== CURRENT file header info
static int tsdbEncodeFSHeader(void **buf, SFSHeader *pHeader) { static int tsdbEncodeFSHeader(void **buf, SFSHeader *pHeader) {
int tlen = 0; int tlen = 0;
@ -1354,4 +1353,4 @@ static void tsdbScanAndTryFixDFilesHeader(STsdbRepo *pRepo, int32_t *nExpired) {
tsdbCloseDFileSet(&fset); tsdbCloseDFileSet(&fset);
} }
} }