提交 106901a4 编写于 作者: S slguan

#1022

上级 f62ccb42
...@@ -161,8 +161,7 @@ IF (NOT DEFINED TD_CLUSTER) ...@@ -161,8 +161,7 @@ IF (NOT DEFINED TD_CLUSTER)
MESSAGE(STATUS "The current OS is Alpine, append extra flags") MESSAGE(STATUS "The current OS is Alpine, append extra flags")
SET(COMMON_FLAGS "${COMMON_FLAGS} -largp") SET(COMMON_FLAGS "${COMMON_FLAGS} -largp")
link_libraries(/usr/lib/libargp.a) link_libraries(/usr/lib/libargp.a)
ELSE () ADD_DEFINITIONS(-D_ALPINE)
ADD_DEFINITIONS(-D__USE_GNU)
ENDIF () ENDIF ()
ELSEIF (TD_LINUX_32) ELSEIF (TD_LINUX_32)
IF (NOT TD_ARM) IF (NOT TD_ARM)
...@@ -178,8 +177,7 @@ IF (NOT DEFINED TD_CLUSTER) ...@@ -178,8 +177,7 @@ IF (NOT DEFINED TD_CLUSTER)
MESSAGE(STATUS "The current OS is Alpine, add extra flags") MESSAGE(STATUS "The current OS is Alpine, add extra flags")
SET(COMMON_FLAGS "${COMMON_FLAGS} -largp") SET(COMMON_FLAGS "${COMMON_FLAGS} -largp")
link_library(/usr/lib/libargp.a) link_library(/usr/lib/libargp.a)
ELSE () ADD_DEFINITIONS(-D_ALPINE)
ADD_DEFINITIONS(-D__USE_GNU)
ENDIF () ENDIF ()
ELSEIF (TD_WINDOWS_64) ELSEIF (TD_WINDOWS_64)
SET(CMAKE_GENERATOR "NMake Makefiles" CACHE INTERNAL "" FORCE) SET(CMAKE_GENERATOR "NMake Makefiles" CACHE INTERNAL "" FORCE)
......
...@@ -130,7 +130,7 @@ void shellParseArgument(int argc, char *argv[], struct arguments *arguments) { ...@@ -130,7 +130,7 @@ void shellParseArgument(int argc, char *argv[], struct arguments *arguments) {
argp_parse(&argp, argc, argv, 0, 0, arguments); argp_parse(&argp, argc, argv, 0, 0, arguments);
if (arguments->abort) { if (arguments->abort) {
#ifdef __USE_GNU #ifndef _ALPINE
error(10, 0, "ABORTED"); error(10, 0, "ABORTED");
#else #else
abort(); abort();
......
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
#include <argp.h> #include <argp.h>
#include <assert.h> #include <assert.h>
#if !defined (__USE_GNU) && defined (LINUX)
#else #ifndef _ALPINE
#include <error.h> #include <error.h>
#endif #endif
#include <pthread.h> #include <pthread.h>
...@@ -313,7 +313,7 @@ int main(int argc, char *argv[]) { ...@@ -313,7 +313,7 @@ int main(int argc, char *argv[]) {
argp_parse(&argp, argc, argv, 0, 0, &arguments); argp_parse(&argp, argc, argv, 0, 0, &arguments);
if (arguments.abort) { if (arguments.abort) {
#ifdef __USE_GNU #ifndef _ALPINE
error(10, 0, "ABORTED"); error(10, 0, "ABORTED");
#else #else
abort(); abort();
......
...@@ -15,9 +15,8 @@ ...@@ -15,9 +15,8 @@
#include <argp.h> #include <argp.h>
#include <assert.h> #include <assert.h>
#if !defined (__USE_GNU) && defined (LINUX) #ifndef _ALPINE
#else #include <error.h>
#include <error.h>
#endif #endif
#include <fcntl.h> #include <fcntl.h>
#include <stdbool.h> #include <stdbool.h>
...@@ -339,7 +338,7 @@ int main(int argc, char *argv[]) { ...@@ -339,7 +338,7 @@ int main(int argc, char *argv[]) {
argp_parse(&argp, argc, argv, 0, 0, &arguments); argp_parse(&argp, argc, argv, 0, 0, &arguments);
if (arguments.abort) { if (arguments.abort) {
#ifdef __USE_GNU #ifndef _ALPINE
error(10, 0, "ABORTED"); error(10, 0, "ABORTED");
#else #else
abort(); abort();
......
...@@ -23,7 +23,7 @@ extern "C" { ...@@ -23,7 +23,7 @@ extern "C" {
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#ifdef __USE_GNU #ifndef _ALPINE
#include <error.h> #include <error.h>
#endif #endif
...@@ -232,7 +232,7 @@ void taosSetCoreDump(); ...@@ -232,7 +232,7 @@ void taosSetCoreDump();
void taosBlockSIGPIPE(); void taosBlockSIGPIPE();
#ifndef __USE_GNU #ifdef _ALPINE
typedef int(*__compar_fn_t)(const void *, const void *); typedef int(*__compar_fn_t)(const void *, const void *);
void error (int, int, const char *); void error (int, int, const char *);
#ifndef PTHREAD_MUTEX_RECURSIVE_NP #ifndef PTHREAD_MUTEX_RECURSIVE_NP
......
...@@ -234,8 +234,8 @@ void *taosProcessAlarmSignal(void *tharg) { ...@@ -234,8 +234,8 @@ void *taosProcessAlarmSignal(void *tharg) {
timer_t timerId; timer_t timerId;
struct sigevent sevent; struct sigevent sevent;
#ifndef __USE_GNU #ifdef _ALPINE
sevent.sigev_notify = SIGEV_THREAD; sevent.sigev_notify = SIGEV_THREAD;
sevent.sigev_value.sival_int = syscall(__NR_gettid); sevent.sigev_value.sival_int = syscall(__NR_gettid);
#else #else
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#ifndef __USE_GNU #ifdef _ALPINE
#include <linux/sysctl.h> #include <linux/sysctl.h>
#else #else
#include <sys/sysctl.h> #include <sys/sysctl.h>
......
...@@ -579,7 +579,12 @@ static int vnodeCloseImportFiles(SMeterObj *pObj, SImportHandle *pHandle) { ...@@ -579,7 +579,12 @@ static int vnodeCloseImportFiles(SMeterObj *pObj, SImportHandle *pHandle) {
SVnodeObj *pVnode = vnodeList + pObj->vnode; SVnodeObj *pVnode = vnodeList + pObj->vnode;
char dpath[TSDB_FILENAME_LEN] = "\0"; char dpath[TSDB_FILENAME_LEN] = "\0";
SCompInfo compInfo; SCompInfo compInfo;
#ifdef _ALPINE
off_t offset = 0; off_t offset = 0;
#else
__off_t offset = 0;
#endif
if (pVnode->nfd > 0) { if (pVnode->nfd > 0) {
offset = lseek(pVnode->nfd, 0, SEEK_CUR); offset = lseek(pVnode->nfd, 0, SEEK_CUR);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册