1/* 2 * OpenVPN -- An application to securely tunnel IP networks 3 * over a single UDP port, with support for SSL/TLS-based 4 * session authentication and key exchange, 5 * packet encryption, packet authentication, and 6 * packet compression. 7 * 8 * Copyright (C) 2011 - David Sommerseth <davids@redhat.com> 9 * 10 * This program is free software; you can redistribute it and/or modify 11 * it under the terms of the GNU General Public License version 2 12 * as published by the Free Software Foundation. 13 * 14 * This program is distributed in the hope that it will be useful, 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 * GNU General Public License for more details. 18 * 19 * You should have received a copy of the GNU General Public License 20 * along with this program (see the file COPYING included with this 21 * distribution); if not, write to the Free Software Foundation, Inc., 22 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 23 */ 24 25#ifndef COMPAT_H 26#define COMPAT_H 27 28#ifdef HAVE_WINSOCK2_H 29#include <winsock2.h> 30#endif 31 32#ifdef HAVE_WS2TCPIP_H 33#include <ws2tcpip.h> 34#endif 35 36#ifdef HAVE_SYS_TIME_H 37#include <sys/time.h> 38#endif 39 40#ifdef HAVE_SYS_SOCKET_H 41#include <sys/socket.h> 42#endif 43 44#ifndef HAVE_DIRNAME 45char * dirname(char *str); 46#endif /* HAVE_DIRNAME */ 47 48#ifndef HAVE_BASENAME 49char * basename(char *str); 50#endif /* HAVE_BASENAME */ 51 52#ifndef HAVE_GETTIMEOFDAY 53int gettimeofday (struct timeval *tv, void *tz); 54#endif 55 56#ifndef HAVE_DAEMON 57int daemon(int nochdir, int noclose); 58#endif 59 60#ifndef HAVE_INET_NTOP 61const char * inet_ntop(int af, const void *src, char *dst, socklen_t size); 62#endif 63 64#ifndef HAVE_INET_PTON 65int inet_pton(int af, const char *src, void *dst); 66#endif 67 68#endif /* COMPAT_H */ 69