diff --git a/cmake/platform.inc b/cmake/platform.inc index 7834a3541127363539270a5a41282991cf7740d8..889f6c73cf2be982df7f1db207114e58d6af3e92 100755 --- a/cmake/platform.inc +++ b/cmake/platform.inc @@ -114,6 +114,9 @@ ELSEIF (${OSTYPE} MATCHES "Ningsi80") MESSAGE(STATUS "input osType: Ningsi80") ELSEIF (${OSTYPE} MATCHES "Linux") MESSAGE(STATUS "input osType: Linux") +ELSEIF (${OSTYPE} MATCHES "Alpine") + MESSAGE(STATUS "input osType: Alpine") + SET(TD_APLHINE TRUE) ELSE () MESSAGE(STATUS "input osType unknown: " ${OSTYPE}) -ENDIF () \ No newline at end of file +ENDIF () diff --git a/src/os/inc/os.h b/src/os/inc/os.h index df4b847fbb83c04cc5501dd73b6197b94ceff1c3..d4b71173a07fe2c36ee1479bc94bbf274b8dd6b6 100644 --- a/src/os/inc/os.h +++ b/src/os/inc/os.h @@ -36,7 +36,7 @@ extern "C" { #include "osLinux32.h" #endif -#ifdef _TD_ALPINE +#ifdef _ALPINE #include "osAlpine.h" #endif diff --git a/src/os/inc/osAlpine.h b/src/os/inc/osAlpine.h index b8212373ce84fa7b028c0b60e0149547c789e950..d939adfb6dafb5251f936187225857660842e54e 100644 --- a/src/os/inc/osAlpine.h +++ b/src/os/inc/osAlpine.h @@ -13,8 +13,8 @@ * along with this program. If not, see . */ -#ifndef TDENGINE_OS_LINUX64_H -#define TDENGINE_OS_LINUX64_H +#ifndef TDENGINE_OS_ALPINE_H +#define TDENGINE_OS_ALPINE_H #ifdef __cplusplus extern "C" { diff --git a/src/os/inc/osLinux64.h b/src/os/inc/osLinux64.h index 0a99f4b74593e43a5c9e579abd82c5511dc5ac4d..c0841c41bde7ab848bcae2b9cbd037675407afbf 100644 --- a/src/os/inc/osLinux64.h +++ b/src/os/inc/osLinux64.h @@ -75,7 +75,9 @@ extern "C" { #include #include #include +#ifndef _ALPINE #include +#endif #include #ifdef __cplusplus diff --git a/src/os/src/detail/osSysinfo.c b/src/os/src/detail/osSysinfo.c index c75e254b0e6fdc8af1a67a156b13c8d6d2fe46d2..83ecd8580946db628e7a785b5becca87db23118c 100644 --- a/src/os/src/detail/osSysinfo.c +++ b/src/os/src/detail/osSysinfo.c @@ -579,7 +579,11 @@ void taosSetCoreDump() { struct rlimit rlim; struct rlimit rlim_new; if (getrlimit(RLIMIT_CORE, &rlim) == 0) { + #ifndef _ALPINE uInfo("the old unlimited para: rlim_cur=%" PRIu64 ", rlim_max=%" PRIu64, rlim.rlim_cur, rlim.rlim_max); + #else + uInfo("the old unlimited para: rlim_cur=%llu, rlim_max=%llu", rlim.rlim_cur, rlim.rlim_max); + #endif rlim_new.rlim_cur = RLIM_INFINITY; rlim_new.rlim_max = RLIM_INFINITY; if (setrlimit(RLIMIT_CORE, &rlim_new) != 0) { @@ -591,7 +595,11 @@ void taosSetCoreDump() { } if (getrlimit(RLIMIT_CORE, &rlim) == 0) { + #ifndef _ALPINE uInfo("the new unlimited para: rlim_cur=%" PRIu64 ", rlim_max=%" PRIu64, rlim.rlim_cur, rlim.rlim_max); + #else + uInfo("the new unlimited para: rlim_cur=%llu, rlim_max=%llu", rlim.rlim_cur, rlim.rlim_max); + #endif } #ifndef _TD_ARM_ @@ -659,4 +667,4 @@ bool taosGetSystemUid(char *uid) { return false; } -#endif \ No newline at end of file +#endif diff --git a/src/util/src/tnote.c b/src/util/src/tnote.c index ea097094498bdafdea19d71c48aa2a6f61a6e181..4f05277a847a07831371278915011ebc4da400c6 100644 --- a/src/util/src/tnote.c +++ b/src/util/src/tnote.c @@ -253,7 +253,7 @@ void taosNotePrint(taosNoteInfo * pNote, const char * const format, ...) ptm->tm_min, ptm->tm_sec, (int)timeSecs.tv_usec, taosGetPthreadId()); #else len = sprintf(buffer, "%02d/%02d %02d:%02d:%02d.%06d %lx ", ptm->tm_mon + 1, ptm->tm_mday, ptm->tm_hour, ptm->tm_min, - ptm->tm_sec, (int)timeSecs.tv_usec, pthread_self()); + ptm->tm_sec, (int)timeSecs.tv_usec, (unsigned long int)pthread_self()); #endif va_start(argpointer, format); len += vsnprintf(buffer + len, MAX_NOTE_LINE_SIZE - len, format, argpointer);