From 8cb5175630b8cd8333c46400c5438919ef8c52a7 Mon Sep 17 00:00:00 2001 From: apio Date: Sun, 5 Feb 2023 14:22:31 +0100 Subject: [PATCH] fix: Do not #include on Windows Instead, we provide our own typedef for mode_t, uid_t and gid_t, and we get time_t from . --- minitar.h | 8 ++++++++ src/util.c | 1 - 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/minitar.h b/minitar.h index d9ccac5..b89e4d8 100644 --- a/minitar.h +++ b/minitar.h @@ -10,7 +10,15 @@ #define MINITAR_H #include #include +#include + +#ifdef _MSC_VER +typedef unsigned int mode_t; +typedef unsigned int gid_t; +typedef unsigned int uid_t; +#else #include +#endif struct minitar { diff --git a/src/util.c b/src/util.c index 5cc7d4c..fda30a8 100644 --- a/src/util.c +++ b/src/util.c @@ -13,7 +13,6 @@ #include #include #include -#include #ifndef __TINYC__ #include