aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/wincompat/compat.h
blob: 5decc6686eb59e0ae3c13b94cf1584899a1bd868 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (C) 2015-2020 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
 */

#define __USE_MINGW_ANSI_STDIO 1
#include <stdio.h>
#include <stdbool.h>
#include <stdint.h>

#include <winsock2.h>
#include <ws2ipdef.h>
#include <ws2tcpip.h>
#include <in6addr.h>
#include <windows.h>

#undef interface
#undef min
#undef max

#define WINCOMPAT

#define IFNAMSIZ 64
#define EAI_SYSTEM -99

/* libc.c */
char *strsep(char **str, const char *sep);
ssize_t getdelim(char **buf, size_t *bufsiz, int delimiter, FILE *fp);
ssize_t getline(char **buf, size_t *bufsiz, FILE *fp);
int inet_pton(int af, const char *src, void *dst);
const char *inet_ntop(int af, const void *src, char *dst, socklen_t size);