diff --git a/src/compat/internal.h b/src/compat/internal.h index d56f1a0..47d32cd 100644 --- a/src/compat/internal.h +++ b/src/compat/internal.h @@ -31,12 +31,10 @@ # define _WIN32_WINNT 0x0502 # include -# include - -typedef int32_t cr_off32; -typedef int64_t cr_off64; - # if defined(__MINGW32__) || defined(__MINGW64__) + +# include "off_t.h" + # if !defined(__MINGW64__) # define off_t cr_off32 # else diff --git a/src/compat/off_t.h b/src/compat/off_t.h new file mode 100644 index 0000000..24dc65d --- /dev/null +++ b/src/compat/off_t.h @@ -0,0 +1,9 @@ +#ifndef OFF_T_H_ +# define OFF_T_H_ + +# include + +typedef int32_t cr_off32; +typedef int64_t cr_off64; + +#endif /* !OFF_T_H_ */ diff --git a/src/compat/posix.h b/src/compat/posix.h index b4a35b5..81af6b3 100644 --- a/src/compat/posix.h +++ b/src/compat/posix.h @@ -42,10 +42,7 @@ # endif # if defined(__MINGW32__) || defined(__MINGW64__) -# include - -typedef int32_t cr_off32; -typedef int64_t cr_off64; +# include "off_t.h" # if !defined(__MINGW64__) # define off_t cr_off32