diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c
index 35a4937fd7a7b051e2d9ca7e974741c42014e99e..82460b6a76e174ab02c737d8a809d3b73f9f953b 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 ba5909923b2e84a70fc987973249e7aab629c1bb..93818d7d73ce29391e1260a5d95f41ad1b0c4fb9 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 2cbd07db4bdee34a52edd1573dd0aa923aec35ad..70660254a5b563e6c7644bc55f0fdd9f84a7a7e1 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 d34bf0e6ce922a09eb9941bb8cac9c98141a68cc..8355ed9dc185241fb42d4381b13f86de48faa1b0 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