diff --git a/lib/string.in.h b/lib/string.in.h --- a/lib/string.in.h +++ b/lib/string.in.h @@ -89,7 +89,11 @@ _GL_EXTERN_C void free (void *); # define free rpl_free #endif +#ifndef _MSC_VER +/* On MSVC the CRT declares free with __declspec(dllimport) linkage. + A plain forward declaration here would conflict (C2375). */ _GL_EXTERN_C void free (void *); +#endif /* Clear a block of memory. The compiler will not delete a call to this function, even if the block is dead after the call. */