diff --git a/cocos/platform/CCImage.cpp b/cocos/platform/CCImage.cpp index e6f972b9e5..91bd8162f9 100644 --- a/cocos/platform/CCImage.cpp +++ b/cocos/platform/CCImage.cpp @@ -39,6 +39,7 @@ THE SOFTWARE. extern "C" { +#if defined(__APPLE__) || defined(__unix) #ifndef __ENABLE_COMPATIBILITY_WITH_UNIX_2003__ #define __ENABLE_COMPATIBILITY_WITH_UNIX_2003__ #include @@ -55,6 +56,7 @@ extern "C" return strerror(errnum); } #endif +#endif #include "png.h" #include "tiffio.h" #include "base/etc1.h"