未验证 提交 faf46dc4 编写于 作者: P plum-lihui 提交者: GitHub

Merge pull request #1023 from taosdata/feature/slguan

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