Merge pull request #702 from stqism/patch-4

Improved support for Plan 9, older SunOS, and AIX.
This commit is contained in:
irungentoo 2014-01-25 20:02:44 -08:00
commit b428429825
2 changed files with 36 additions and 3 deletions

View File

@ -1,7 +1,7 @@
#Install Instructions
- [Installation](#installation)
- [Linux](#linux)
- [Unix like (Linux)](#unix)
- [OS X](#osx)
- [Homebrew](#homebrew)
- [Non-Homebrew](#non-homebrew)
@ -10,11 +10,15 @@
<a name="installation" />
##Installation
<a name="linux" />
###Linux:
<a name="unix" />
###Most Unix like OSes (Linux):
Build dependencies:
Note: package fetching commands may vary by OS.
On Ubuntu:
```bash
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
```
@ -26,6 +30,17 @@ yum groupinstall "Development Tools"
yum install libtool autoconf automake libconfig-devel ncurses-devel check check-devel
```
On SunOS:
```pfexcec
pkg install autoconf automake gcc-47
```
On FreeBSD 10+:
```tcsh
pkg install automake autoconf
```
Note that `libconfig-dev` should be >= 1.4.
You should get and install [libsodium](https://github.com/jedisct1/libsodium):

View File

@ -24,6 +24,11 @@
#ifndef NETWORK_H
#define NETWORK_H
#ifdef PLAN9
#include <u.h> //Plan 9 requires this is imported first
#include <libc.h>
#endif
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
@ -75,6 +80,19 @@ typedef int sock_t;
#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
#endif
#ifndef VANILLA_NACL
/* We use libsodium by default. */
#include <sodium.h>