diff --git a/source/libs/tfs/inc/tfsint1.h b/source/libs/tfs/inc/tfsInt.h similarity index 98% rename from source/libs/tfs/inc/tfsint1.h rename to source/libs/tfs/inc/tfsInt.h index caa52b5cd6..40eb61ba07 100644 --- a/source/libs/tfs/inc/tfsint1.h +++ b/source/libs/tfs/inc/tfsInt.h @@ -18,15 +18,13 @@ #include "os.h" +#include "taosdef.h" #include "taoserror.h" -#include "tlog.h" -#include "tglobal.h" -#include "tfs.h" #include "tcoding.h" - -#ifdef __cplusplus -extern "C" { -#endif +#include "tfs.h" +#include "tglobal.h" +#include "thash.h" +#include "tlog.h" extern int fsDebugFlag; diff --git a/source/libs/tfs/src/tfs.c b/source/libs/tfs/src/tfs.c index 88d6d587a7..a054981961 100644 --- a/source/libs/tfs/src/tfs.c +++ b/source/libs/tfs/src/tfs.c @@ -13,13 +13,8 @@ * along with this program. If not, see . */ -#include "os.h" - -#include "taosdef.h" -#include "taoserror.h" -#include "tfs.h" -#include "tfsint.h" -#include "thash.h" +#define _DEFAULT_SOURCE +#include "tfsInt.h" #define TMPNAME_LEN (TSDB_FILENAME_LEN * 2 + 32) diff --git a/source/libs/tfs/src/tfsDisk.c b/source/libs/tfs/src/tfsDisk.c index f32069837d..98656c84e6 100644 --- a/source/libs/tfs/src/tfsDisk.c +++ b/source/libs/tfs/src/tfsDisk.c @@ -14,7 +14,7 @@ */ #define _DEFAULT_SOURCE -#include "tfsint.h" +#include "tfsInt.h" SDisk *tfsNewDisk(int32_t level, int32_t id, const char *dir) { SDisk *pDisk = calloc(1, sizeof(SDisk)); diff --git a/source/libs/tfs/src/tfsTier.c b/source/libs/tfs/src/tfsTier.c index 3b19797acf..90057e61d5 100644 --- a/source/libs/tfs/src/tfsTier.c +++ b/source/libs/tfs/src/tfsTier.c @@ -12,11 +12,9 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ -#include "os.h" -#include "taosdef.h" -#include "taoserror.h" -#include "tfsint.h" +#define _DEFAULT_SOURCE +#include "tfsInt.h" #define tfsLockTier(pTier) pthread_spin_lock(&((pTier)->lock)) #define tfsUnLockTier(pTier) pthread_spin_unlock(&((pTier)->lock))