diff options
-rw-r--r-- | INSTALL.md | 21 | ||||
-rw-r--r-- | toxcore/network.h | 18 |
2 files changed, 36 insertions, 3 deletions
@@ -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 | ||
16 | Build dependencies: | 16 | Build dependencies: |
17 | 17 | ||
18 | Note: package fetching commands may vary by OS. | ||
19 | |||
20 | On Ubuntu: | ||
21 | |||
18 | ```bash | 22 | ```bash |
19 | sudo 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 | 23 | sudo 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" | |||
26 | yum install libtool autoconf automake libconfig-devel ncurses-devel check check-devel | 30 | yum install libtool autoconf automake libconfig-devel ncurses-devel check check-devel |
27 | ``` | 31 | ``` |
28 | 32 | ||
33 | On SunOS: | ||
34 | |||
35 | ```pfexcec | ||
36 | pkg install autoconf automake gcc-47 | ||
37 | ``` | ||
38 | On FreeBSD 10+: | ||
39 | |||
40 | ```tcsh | ||
41 | pkg install automake autoconf | ||
42 | ``` | ||
43 | |||
29 | Note that `libconfig-dev` should be >= 1.4. | 44 | Note that `libconfig-dev` should be >= 1.4. |
30 | 45 | ||
31 | You should get and install [libsodium](https://github.com/jedisct1/libsodium): | 46 | You 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> |