From 900e3bea6b4949cf646071967f2be93ce6009651 Mon Sep 17 00:00:00 2001 From: Sean Date: Sat, 25 Jan 2014 10:44:07 -0800 Subject: [PATCH] Improved support for Plan 9, older SunOS, and AIX. --- toxcore/tox.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/toxcore/tox.h b/toxcore/tox.h index f3118270..aff8b17e 100644 --- a/toxcore/tox.h +++ b/toxcore/tox.h @@ -24,6 +24,11 @@ #ifndef TOX_H #define TOX_H +#ifndef PLAN9 +#include +#include +#endif + #include #if defined(_WIN32) || defined(__WIN32__) || defined (WIN32) @@ -57,6 +62,18 @@ typedef short sa_family_t; extern "C" { #endif +#if defined(__AIX__) +# define _XOPEN_SOURCE 1 +#endif + +#if defined(__sun__) +#define __EXTENSIONS__ 1 /* SunOS */ +#if defined(__SunOS5_6__) || defined(__SunOS5_7__) || defined(__SunOS5_8__) || defined(__SunOS5_9__) || defined(__SunOS5_10__) +//Nothing needed +#else +#define __MAKECONTEXT_V2_SOURCE 1 +#endif + #define TOX_MAX_NAME_LENGTH 128 #define TOX_MAX_STATUSMESSAGE_LENGTH 128 #define TOX_CLIENT_ID_SIZE 32