Is there an alternative to inet_ntop / InetNtop in Windows XP?

后端 未结 4 1981
耶瑟儿~
耶瑟儿~ 2020-12-31 20:54

I\'m trying to compile beej\'s guide to network programming examples, but Windows XP doesn\'t have such a function. I\'m using mingw, if it makes any difference.

4条回答
  •  自闭症患者
    2020-12-31 21:16

    There is also inet_ntop function in POSIX compliant libc for Windows (PlibC) library that was created for porting POSIX applications to Windows. There is no notes about it in online documentation, but it exists in file inet_ntop.c at least since 2008 (according to file date).

    const char * inet_ntop(int af, const void *src, char *dst, size_t size)
    

提交回复
热议问题