两个项目libevent、memcached,Platform Toolset使用Visual Studio 2013 - Windows XP (v120_xp)。在编译memcached时会提示"inet_pton redefinition"。

打开项目下的win32.h,将inet_pton函数注释掉重新编译。

inline int inet_pton(int af, register const char *cp, struct in_addr *addr)
{
    if(af != AF_INET) {
        WSASetLastError(WSAEPFNOSUPPORT);
        return -1;
    }
    return inet_aton(cp, addr);
}

 

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-13
  • 2021-08-09
  • 2021-09-20
  • 2021-10-17
  • 2021-05-13
  • 2022-01-31
猜你喜欢
  • 2021-06-13
  • 2022-12-23
  • 2021-07-10
  • 2021-12-22
  • 2021-08-01
  • 2021-08-21
  • 2022-12-23
相关资源
相似解决方案