fix compile errors

This commit is contained in:
Shengliang Guan 2021-11-23 18:20:57 +08:00
parent 24302611b9
commit 6c62690911
6 changed files with 21 additions and 10 deletions

View File

@ -38,9 +38,9 @@ extern SNoteObj tsHttpNote;
extern SNoteObj tsTscNote; extern SNoteObj tsTscNote;
extern SNoteObj tsInfoNote; extern SNoteObj tsInfoNote;
void taosInitNotes(); int32_t taosInitNotes();
void taosNotePrint(SNoteObj* pNote, const char* const format, ...); void taosNotePrint(SNoteObj* pNote, const char* const format, ...);
void taosNotePrintBuffer(SNoteObj *pNote, char *buffer, int32_t len); void taosNotePrintBuffer(SNoteObj* pNote, char* buffer, int32_t len);
#define nPrintHttp(...) \ #define nPrintHttp(...) \
if (tsHttpEnableRecordSql) { \ if (tsHttpEnableRecordSql) { \

View File

@ -16,7 +16,9 @@
#define _DEFAULT_SOURCE #define _DEFAULT_SOURCE
#include "dnode.h" #include "dnode.h"
#include "os.h" #include "os.h"
#include "tconfig.h"
#include "tglobal.h" #include "tglobal.h"
#include "tnote.h"
#include "ulog.h" #include "ulog.h"
static struct { static struct {
@ -68,7 +70,11 @@ int dmnParseOpts(int argc, char const *argv[]) {
return 0; return 0;
} }
void dmnGenerateGrant() { grantParseParameter(); } void dmnGenerateGrant() {
#if 0
grantParseParameter();
#endif
}
void dmnPrintVersion() { void dmnPrintVersion() {
#ifdef TD_ENTERPRISE #ifdef TD_ENTERPRISE
@ -83,9 +89,6 @@ void dmnPrintVersion() {
} }
int dmnReadConfig(const char *path) { int dmnReadConfig(const char *path) {
taosIgnSIGPIPE();
taosBlockSIGPIPE();
taosResolveCRC();
taosInitGlobalCfg(); taosInitGlobalCfg();
taosReadGlobalLogCfg(); taosReadGlobalLogCfg();

View File

@ -1,5 +1,5 @@
aux_source_directory(src DNODE_SRC) aux_source_directory(src DNODE_SRC)
add_library(dnode ${DNODE_SRC}) add_library(dnode STATIC ${DNODE_SRC})
target_link_libraries( target_link_libraries(
dnode dnode
PUBLIC cjson PUBLIC cjson

View File

@ -21,6 +21,7 @@
#include "sync.h" #include "sync.h"
#include "tcache.h" #include "tcache.h"
#include "wal.h" #include "wal.h"
#include "tcrc32c.h"
EStat dndGetStat(SDnode *pDnode) { return pDnode->stat; } EStat dndGetStat(SDnode *pDnode) { return pDnode->stat; }
@ -135,6 +136,10 @@ static void dndCleanupEnv(SDnode *pDnode) {
} }
SDnode *dndInit(SDnodeOpt *pOptions) { SDnode *dndInit(SDnodeOpt *pOptions) {
taosIgnSIGPIPE();
taosBlockSIGPIPE();
taosResolveCRC();
SDnode *pDnode = calloc(1, sizeof(pDnode)); SDnode *pDnode = calloc(1, sizeof(pDnode));
if (pDnode == NULL) { if (pDnode == NULL) {
dError("failed to create dnode object"); dError("failed to create dnode object");

View File

@ -207,6 +207,8 @@ void mnodeCleanupMsg(SMnodeMsg *pMsg) {
taosFreeQitem(pMsg); taosFreeQitem(pMsg);
} }
void mnodeSendRsp(SMnodeMsg *pMsg, int32_t code) {}
static void mnodeProcessRpcMsg(SMnodeMsg *pMsg) { static void mnodeProcessRpcMsg(SMnodeMsg *pMsg) {
if (!mnodeIsMaster()) { if (!mnodeIsMaster()) {
mnodeSendRedirectMsg(NULL, &pMsg->rpcMsg, true); mnodeSendRedirectMsg(NULL, &pMsg->rpcMsg, true);

View File

@ -40,7 +40,7 @@ static void taosInitNote(int32_t numOfLines, int32_t maxNotes, SNoteObj *pNote,
taosNotePrint(pNote, "=================================================="); taosNotePrint(pNote, "==================================================");
} }
void taosInitNotes() { int32_t taosInitNotes() {
char name[TSDB_FILENAME_LEN * 2] = {0}; char name[TSDB_FILENAME_LEN * 2] = {0};
#if 0 #if 0
@ -58,7 +58,8 @@ void taosInitNotes() {
snprintf(name, TSDB_FILENAME_LEN * 2, "%s/taosinfo", tsLogDir); snprintf(name, TSDB_FILENAME_LEN * 2, "%s/taosinfo", tsLogDir);
taosInitNote(tsNumOfLogLines, 1, &tsInfoNote, name); taosInitNote(tsNumOfLogLines, 1, &tsInfoNote, name);
} }
#endif #endif
return 0;
} }
static bool taosLockNote(int32_t fd, SNoteObj *pNote) { static bool taosLockNote(int32_t fd, SNoteObj *pNote) {