diff --git a/include/share/alloc.h b/include/share/alloc.h index 42528c1c..812aa69d 100644 --- a/include/share/alloc.h +++ b/include/share/alloc.h @@ -34,10 +34,14 @@ #include /* for size_t, malloc(), etc */ #ifndef SIZE_MAX -#ifndef SIZE_T_MAX -#error -#endif -#define SIZE_MAX SIZE_T_MAX +# ifndef SIZE_T_MAX +# ifdef _MSC_VER +# define SIZE_T_MAX UINT_MAX +# else +# error +# endif +# endif +# define SIZE_MAX SIZE_T_MAX #endif #ifndef FLaC__INLINE