Skip to content

Commit

Permalink
Merge pull request #240 from AMDmi3/freebsd
Browse files Browse the repository at this point in the history
Fix compatibility with FreeBSD and improve readability in miniz_zip.c
  • Loading branch information
uroni committed Jul 9, 2022
2 parents 76b3a87 + de0a4d2 commit be92575
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion miniz_zip.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ static int mz_stat64(const char *path, struct __stat64 *buffer)
#define MZ_FFLUSH fflush
#define MZ_FREOPEN mz_freopen
#define MZ_DELETE_FILE remove

#elif defined(__MINGW32__) || defined(__WATCOMC__)
#ifndef MINIZ_NO_TIME
#include <sys/utime.h>
Expand All @@ -111,6 +112,7 @@ static int mz_stat64(const char *path, struct __stat64 *buffer)
#define MZ_FFLUSH fflush
#define MZ_FREOPEN(f, m, s) freopen(f, m, s)
#define MZ_DELETE_FILE remove

#elif defined(__TINYC__)
#ifndef MINIZ_NO_TIME
#include <sys/utime.h>
Expand All @@ -126,6 +128,7 @@ static int mz_stat64(const char *path, struct __stat64 *buffer)
#define MZ_FFLUSH fflush
#define MZ_FREOPEN(f, m, s) freopen(f, m, s)
#define MZ_DELETE_FILE remove

#elif defined(__USE_LARGEFILE64) /* gcc, clang */
#ifndef MINIZ_NO_TIME
#include <utime.h>
Expand All @@ -141,7 +144,8 @@ static int mz_stat64(const char *path, struct __stat64 *buffer)
#define MZ_FFLUSH fflush
#define MZ_FREOPEN(p, m, s) freopen64(p, m, s)
#define MZ_DELETE_FILE remove
#elif defined(__APPLE__)

#elif defined(__APPLE__) || defined(__FreeBSD__)
#ifndef MINIZ_NO_TIME
#include <utime.h>
#endif
Expand Down

0 comments on commit be92575

Please sign in to comment.