mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
specify WSAAPI as return type too, needed for MSYS2-32bit
This commit is contained in:
parent
b879e0835b
commit
919f8c16d0
4 changed files with 7 additions and 9 deletions
|
@ -61,10 +61,10 @@
|
|||
#endif // HAVE_WS2TCPIP_H
|
||||
|
||||
#if !defined(HAVE_INET_NTOP)
|
||||
extern const char *inet_ntop(int, const void *, char *, size_t);
|
||||
extern const char* WSAAPI inet_ntop(int, const void *, char *, size_t);
|
||||
#endif
|
||||
#if !defined(HAVE_INET_NTOP)
|
||||
extern int inet_pton(int , const char *, void *);
|
||||
extern int WSAAPI inet_pton(int , const char *, void *);
|
||||
#endif
|
||||
|
||||
#define OPTLEN int
|
||||
|
|
|
@ -43,10 +43,10 @@
|
|||
#include <ws2tcpip.h>
|
||||
#endif // HAVE_WS2TCPIP_H
|
||||
#if !defined(HAVE_INET_NTOP)
|
||||
extern const char *inet_ntop(int, const void *, char *, size_t);
|
||||
extern const char* WSAAPI inet_ntop(int, const void *, char *, size_t);
|
||||
#endif
|
||||
#if !defined(HAVE_INET_NTOP)
|
||||
extern int inet_pton(int , const char *, void *);
|
||||
extern int WSAAPI inet_pton(int , const char *, void *);
|
||||
#endif
|
||||
#else /* !_WIN32 */
|
||||
#include <netdb.h>
|
||||
|
|
|
@ -56,11 +56,8 @@ static __attribute__((unused)) const char *inet_ntop6(const u_char *src, char *
|
|||
* Paul Vixie, 1996.
|
||||
*/
|
||||
const char *
|
||||
inet_ntop(af, src, dst, size)
|
||||
int af;
|
||||
const void *src;
|
||||
char *dst;
|
||||
size_t size;
|
||||
WSAAPI
|
||||
inet_ntop(int af, const void *src, char *dst, size_t size)
|
||||
{
|
||||
switch (af) {
|
||||
case AF_INET:
|
||||
|
|
|
@ -63,6 +63,7 @@ static int inet_pton6(const char *src, uint8_t *dst);
|
|||
* Paul Vixie, 1996.
|
||||
*/
|
||||
int
|
||||
WSAAPI
|
||||
inet_pton(int af, const char *src, void *dst)
|
||||
{
|
||||
|
||||
|
|
Loading…
Reference in a new issue