Skip to content

Commit

Permalink
[fdb] Relocate #include<unistd.h> (fixed #248)
Browse files Browse the repository at this point in the history
  • Loading branch information
BecauseItIsThere authored Oct 12, 2023
1 parent 530cffc commit 09fa698
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/fdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 09fa698

Please sign in to comment.