summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorirungentoo <irungentoo@tox.im>2014-01-25 20:02:44 -0800
committerirungentoo <irungentoo@tox.im>2014-01-25 20:02:44 -0800
commitb42842982557c77f4e8d8070a90a996133f94cf0 (patch)
treed25f5ec5a60ae77a94dcbf6e7773179bc1df9b3b
parent7df9c0eb4bdecb8496ab43a1e3b3f74273899595 (diff)
parent460e52c42696a0de8cbe5b86f67f7cab0d8cf95a (diff)
Merge pull request #702 from stqism/patch-4
Improved support for Plan 9, older SunOS, and AIX.
-rw-r--r--INSTALL.md21
-rw-r--r--toxcore/network.h18
2 files changed, 36 insertions, 3 deletions
diff --git a/INSTALL.md b/INSTALL.md
index 03e3da2c..858dff61 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -1,7 +1,7 @@
1#Install Instructions 1#Install Instructions
2 2
3- [Installation](#installation) 3- [Installation](#installation)
4 - [Linux](#linux) 4 - [Unix like (Linux)](#unix)
5 - [OS X](#osx) 5 - [OS X](#osx)
6 - [Homebrew](#homebrew) 6 - [Homebrew](#homebrew)
7 - [Non-Homebrew](#non-homebrew) 7 - [Non-Homebrew](#non-homebrew)
@@ -10,11 +10,15 @@
10<a name="installation" /> 10<a name="installation" />
11##Installation 11##Installation
12 12
13<a name="linux" /> 13<a name="unix" />
14###Linux: 14###Most Unix like OSes (Linux):
15 15
16Build dependencies: 16Build dependencies:
17 17
18Note: package fetching commands may vary by OS.
19
20On Ubuntu:
21
18```bash 22```bash
19sudo apt-get install build-essential libtool autotools-dev automake libconfig-dev ncurses-dev checkinstall check git libswscale-dev libsdl-dev libopenal-dev libopus-dev libvpx-dev yasm 23sudo apt-get install build-essential libtool autotools-dev automake libconfig-dev ncurses-dev checkinstall check git libswscale-dev libsdl-dev libopenal-dev libopus-dev libvpx-dev yasm
20``` 24```
@@ -26,6 +30,17 @@ yum groupinstall "Development Tools"
26yum install libtool autoconf automake libconfig-devel ncurses-devel check check-devel 30yum install libtool autoconf automake libconfig-devel ncurses-devel check check-devel
27``` 31```
28 32
33On SunOS:
34
35```pfexcec
36pkg install autoconf automake gcc-47
37```
38On FreeBSD 10+:
39
40```tcsh
41pkg install automake autoconf
42```
43
29Note that `libconfig-dev` should be >= 1.4. 44Note that `libconfig-dev` should be >= 1.4.
30 45
31You should get and install [libsodium](https://github.com/jedisct1/libsodium): 46You should get and install [libsodium](https://github.com/jedisct1/libsodium):
diff --git a/toxcore/network.h b/toxcore/network.h
index 0e0f0af9..2ba2b005 100644
--- a/toxcore/network.h
+++ b/toxcore/network.h
@@ -24,6 +24,11 @@
24#ifndef NETWORK_H 24#ifndef NETWORK_H
25#define NETWORK_H 25#define NETWORK_H
26 26
27#ifdef PLAN9
28#include <u.h> //Plan 9 requires this is imported first
29#include <libc.h>
30#endif
31
27#include <stdlib.h> 32#include <stdlib.h>
28#include <stdio.h> 33#include <stdio.h>
29#include <stdint.h> 34#include <stdint.h>
@@ -75,6 +80,19 @@ typedef int sock_t;
75 80
76#endif 81#endif
77 82
83#if defined(__AIX__)
84# define _XOPEN_SOURCE 1
85#endif
86
87#if defined(__sun__)
88#define __EXTENSIONS__ 1 // SunOS!
89#if defined(__SunOS5_6__) || defined(__SunOS5_7__) || defined(__SunOS5_8__) || defined(__SunOS5_9__) || defined(__SunOS5_10__)
90//Nothing needed
91#else
92#define __MAKECONTEXT_V2_SOURCE 1
93#endif
94#endif
95
78#ifndef VANILLA_NACL 96#ifndef VANILLA_NACL
79/* We use libsodium by default. */ 97/* We use libsodium by default. */
80#include <sodium.h> 98#include <sodium.h>