diff --git a/source/libs/sync/inc/syncRequestVote.h b/source/libs/sync/inc/syncRequestVote.h
index c51ea4eea6..ae8e3ff1cf 100644
--- a/source/libs/sync/inc/syncRequestVote.h
+++ b/source/libs/sync/inc/syncRequestVote.h
@@ -21,7 +21,6 @@ extern "C" {
#endif
#include "syncInt.h"
-#include "syncMessage.h"
// TLA+ Spec
// HandleRequestVoteRequest(i, j, m) ==
diff --git a/source/libs/sync/inc/syncRequestVoteReply.h b/source/libs/sync/inc/syncRequestVoteReply.h
index 1adab30aaa..ea43f0301d 100644
--- a/source/libs/sync/inc/syncRequestVoteReply.h
+++ b/source/libs/sync/inc/syncRequestVoteReply.h
@@ -21,7 +21,6 @@ extern "C" {
#endif
#include "syncInt.h"
-#include "syncMessage.h"
// TLA+ Spec
// HandleRequestVoteResponse(i, j, m) ==
diff --git a/source/libs/sync/src/syncRaftStore.c b/source/libs/sync/src/syncRaftStore.c
index dcc4e1f133..1c96e70858 100644
--- a/source/libs/sync/src/syncRaftStore.c
+++ b/source/libs/sync/src/syncRaftStore.c
@@ -13,6 +13,7 @@
* along with this program. If not, see .
*/
+#define _DEFAULT_SOURCE
#include "syncRaftStore.h"
#include "cJSON.h"
#include "syncEnv.h"
diff --git a/source/libs/sync/src/syncReplication.c b/source/libs/sync/src/syncReplication.c
index 3f22a1f2cd..2a3705e139 100644
--- a/source/libs/sync/src/syncReplication.c
+++ b/source/libs/sync/src/syncReplication.c
@@ -13,14 +13,11 @@
* along with this program. If not, see .
*/
+#define _DEFAULT_SOURCE
#include "syncReplication.h"
#include "syncIndexMgr.h"
-#include "syncMessage.h"
-#include "syncRaftCfg.h"
#include "syncRaftEntry.h"
-#include "syncRaftLog.h"
#include "syncRaftStore.h"
-#include "syncSnapshot.h"
#include "syncUtil.h"
// TLA+ Spec
diff --git a/source/libs/sync/src/syncRequestVote.c b/source/libs/sync/src/syncRequestVote.c
index 7e2587372b..f2b75def6b 100644
--- a/source/libs/sync/src/syncRequestVote.c
+++ b/source/libs/sync/src/syncRequestVote.c
@@ -13,8 +13,8 @@
* along with this program. If not, see .
*/
+#define _DEFAULT_SOURCE
#include "syncRequestVote.h"
-#include "syncInt.h"
#include "syncRaftCfg.h"
#include "syncRaftStore.h"
#include "syncUtil.h"
diff --git a/source/libs/sync/src/syncRequestVoteReply.c b/source/libs/sync/src/syncRequestVoteReply.c
index 44efaa068a..02b9bb40ac 100644
--- a/source/libs/sync/src/syncRequestVoteReply.c
+++ b/source/libs/sync/src/syncRequestVoteReply.c
@@ -13,11 +13,9 @@
* along with this program. If not, see .
*/
+#define _DEFAULT_SOURCE
#include "syncRequestVoteReply.h"
-#include "syncInt.h"
-#include "syncRaftCfg.h"
#include "syncRaftStore.h"
-#include "syncUtil.h"
#include "syncVoteMgr.h"
// TLA+ Spec