summaryrefslogtreecommitdiffstats
path: root/libavutil/ppc/cpu.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-05-31 22:09:37 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-05-31 22:11:40 +0200
commit47cc1a2bf1b757dc388cd47f43dc64e5cc543918 (patch)
tree298660304be4f8e0bd007bd665cf8db6cf411d7c /libavutil/ppc/cpu.c
parentff1995437fa22f82bff68e3fca61dfed1efbdfbb (diff)
downloadffmpeg-streaming-47cc1a2bf1b757dc388cd47f43dc64e5cc543918.zip
ffmpeg-streaming-47cc1a2bf1b757dc388cd47f43dc64e5cc543918.tar.gz
avutil/ppc/cpu: Check if unistd.h is available before including it
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/ppc/cpu.c')
-rw-r--r--libavutil/ppc/cpu.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavutil/ppc/cpu.c b/libavutil/ppc/cpu.c
index 1c87fd9..e20dec1 100644
--- a/libavutil/ppc/cpu.c
+++ b/libavutil/ppc/cpu.c
@@ -16,13 +16,17 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "config.h"
+
#ifdef __APPLE__
#include <sys/sysctl.h>
#elif defined(__linux__)
#include <asm/cputable.h>
#include <linux/auxvec.h>
#include <fcntl.h>
+#if HAVE_UNISTD_H
#include <unistd.h>
+#endif
#elif defined(__OpenBSD__)
#include <sys/param.h>
#include <sys/sysctl.h>
@@ -35,7 +39,6 @@
#include "libavutil/cpu.h"
#include "libavutil/cpu_internal.h"
-#include "config.h"
/**
* This function MAY rely on signal() or fork() in order to make sure AltiVec
OpenPOWER on IntegriCloud