Fix build issues on Ubuntu 13.04

* Add missing <unistd.h> include
 * Check for presence of bzip2 library

MD-19678 #time 10m
This commit is contained in:
Robert Knight 2013-08-29 16:38:19 +01:00
parent dab236d8de
commit b6a13d3faa
2 changed files with 3 additions and 0 deletions

View file

@ -40,6 +40,8 @@ if (UNIX)
# #
# see http://stackoverflow.com/questions/1835489/linking-an-application-to-libbz2-so-1-rather-than-libbz2-so-1-0 # see http://stackoverflow.com/questions/1835489/linking-an-application-to-libbz2-so-1-rather-than-libbz2-so-1-0
# #
find_package(BZip2)
set(BZ2_LIB_NAME bz2) set(BZ2_LIB_NAME bz2)
if (NOT APPLE) if (NOT APPLE)
set(BZ2_LIB_NAME bz2.a) set(BZ2_LIB_NAME bz2.a)

View file

@ -6,6 +6,7 @@
#ifdef PLATFORM_UNIX #ifdef PLATFORM_UNIX
#include <stdlib.h> #include <stdlib.h>
#include <pwd.h> #include <pwd.h>
#include <unistd.h>
#endif #endif
#ifdef PLATFORM_WINDOWS #ifdef PLATFORM_WINDOWS