diff --git a/src/mnode/src/mnodeCluster.c b/src/mnode/src/mnodeCluster.c index 94ec59b1b085208349d17dfa6ed203b36ebbf61b..169d2ebd9dae1bcc34ea24dd3770951f9cbb442b 100644 --- a/src/mnode/src/mnodeCluster.c +++ b/src/mnode/src/mnodeCluster.c @@ -138,14 +138,6 @@ void mnodeDecClusterRef(SClusterObj *pCluster) { sdbDecRef(tsClusterSdb, pCluster); } -#ifdef __APPLE__ -bool taosGetSystemUid(char *uid) { - fprintf(stderr, "%s[%d]%s(): not implemented yet!\n", basename(__FILE__), __LINE__, __func__); - abort(); - return false; -} -#endif // __APPLE__ - static int32_t mnodeCreateCluster() { int64_t numOfClusters = sdbGetNumOfRows(tsClusterSdb); if (numOfClusters != 0) return TSDB_CODE_SUCCESS; diff --git a/src/os/src/darwin/darwinSysInfo.c b/src/os/src/darwin/darwinSysInfo.c index ad3facdcee50775aeea0794b60c0d9f82d1de538..5fa61b07acbd7f2f11154320a4351a8a0bec9895 100644 --- a/src/os/src/darwin/darwinSysInfo.c +++ b/src/os/src/darwin/darwinSysInfo.c @@ -103,4 +103,10 @@ int taosSystem(const char *cmd) { void taosSetCoreDump() {} -char *taosGetCmdlineByPID(int pid) { return ""; } \ No newline at end of file +char *taosGetCmdlineByPID(int pid) { return ""; } + +bool taosGetSystemUid(char *uid) { + fprintf(stderr, "%s[%d]%s(): not implemented yet!\n", basename(__FILE__), __LINE__, __func__); + abort(); + return false; +} \ No newline at end of file diff --git a/src/plugins/http/inc/httpUtil.h b/src/plugins/http/inc/httpUtil.h index 61cd50a77a29ad8b9a2058f4ad569493b18618ac..54c95b6980f8241c3ea6c8e563e0e42c7c737286 100644 --- a/src/plugins/http/inc/httpUtil.h +++ b/src/plugins/http/inc/httpUtil.h @@ -17,7 +17,7 @@ #define TDENGINE_HTTP_UTIL_H bool httpCheckUsedbSql(char *sql); -void httpTimeToString(time_t t, char *buf, int32_t buflen); +void httpTimeToString(int32_t t, char *buf, int32_t buflen); bool httpUrlMatch(HttpContext *pContext, int32_t pos, char *cmp); bool httpParseRequest(HttpContext *pContext); diff --git a/src/plugins/http/src/httpUtil.c b/src/plugins/http/src/httpUtil.c index 7f1e2a94d1918151277f46670f54681d64e8b56f..a84ae9f617d7ecd43c98d942dea95d99fd9ba901 100644 --- a/src/plugins/http/src/httpUtil.c +++ b/src/plugins/http/src/httpUtil.c @@ -29,7 +29,7 @@ bool httpCheckUsedbSql(char *sql) { return false; } -void httpTimeToString(time_t t, char *buf, int32_t buflen) { +void httpTimeToString(int32_t t, char *buf, int32_t buflen) { memset(buf, 0, (size_t)buflen); char ts[32] = {0}; @@ -37,7 +37,7 @@ void httpTimeToString(time_t t, char *buf, int32_t buflen) { time_t tt = t / 1000; ptm = localtime(&tt); strftime(ts, 31, "%Y-%m-%d %H:%M:%S", ptm); - sprintf(buf, "%s.%03" PRId64, ts, t % 1000); + sprintf(buf, "%s.%03d", ts, t % 1000); } int32_t httpAddToSqlCmdBuffer(HttpContext *pContext, const char *const format, ...) {