[fdb] Relocate `#include<unistd.h>` (fixed #248)

This commit is contained in:
BecauseItIsThere 2023-10-12 18:51:19 +09:00 committed by GitHub
parent 530cffcab1
commit 09fa698f95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 3 deletions

View File

@ -16,6 +16,12 @@
#include <string.h>
#include <inttypes.h>
#ifdef FDB_USING_FILE_POSIX_MODE
#if !defined(_MSC_VER)
#include <unistd.h>
#endif
#endif /* FDB_USING_FILE_POSIX_MODE */
#define FDB_LOG_TAG ""
#if !defined(FDB_USING_FAL_MODE) && !defined(FDB_USING_FILE_MODE)
@ -116,9 +122,6 @@ void _fdb_deinit(fdb_db_t db)
#ifdef FDB_USING_FILE_MODE
#ifdef FDB_USING_FILE_POSIX_MODE
if (db->cur_file > 0) {
#if !defined(_MSC_VER)
#include <unistd.h>
#endif
close(db->cur_file);
}
#else