From 5583060b00388b25979ba92642a29e7962a43315 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Mon, 25 May 2020 22:37:54 +0800 Subject: [PATCH] support glibc 2.17 (default version of CentOS7). [TD-420] --- src/client/src/tscSQLParser.c | 3 ++- src/kit/shell/src/shellEngine.c | 2 ++ src/kit/shell/src/shellImport.c | 1 + src/util/src/ttime.c | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index 35a4937fd7..82460b6a76 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -13,7 +13,8 @@ * along with this program. If not, see . */ -#define _XOPEN_SOURCE +#define _BSD_SOURCE +#define _XOPEN_SOURCE 500 #define _DEFAULT_SOURCE #include "os.h" diff --git a/src/kit/shell/src/shellEngine.c b/src/kit/shell/src/shellEngine.c index ba5909923b..93818d7d73 100644 --- a/src/kit/shell/src/shellEngine.c +++ b/src/kit/shell/src/shellEngine.c @@ -13,6 +13,8 @@ * along with this program. If not, see . */ +#define _BSD_SOURCE +#define _GNU_SOURCE #define _XOPEN_SOURCE #define _DEFAULT_SOURCE diff --git a/src/kit/shell/src/shellImport.c b/src/kit/shell/src/shellImport.c index 2cbd07db4b..70660254a5 100644 --- a/src/kit/shell/src/shellImport.c +++ b/src/kit/shell/src/shellImport.c @@ -13,6 +13,7 @@ * along with this program. If not, see . */ +#define _GNU_SOURCE #define _XOPEN_SOURCE #define _DEFAULT_SOURCE diff --git a/src/util/src/ttime.c b/src/util/src/ttime.c index d34bf0e6ce..8355ed9dc1 100644 --- a/src/util/src/ttime.c +++ b/src/util/src/ttime.c @@ -13,6 +13,7 @@ * along with this program. If not, see . */ +#define _BSD_SOURCE #define _XOPEN_SOURCE #define _DEFAULT_SOURCE -- GitLab