[FFmpeg-cvslog] avutil/ppc/cpu: Check if unistd.h is available before including it
Michael Niedermayer
git at videolan.org
Sun May 31 22:19:05 CEST 2015
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun May 31 22:09:37 2015 +0200| [47cc1a2bf1b757dc388cd47f43dc64e5cc543918] | committer: Michael Niedermayer
avutil/ppc/cpu: Check if unistd.h is available before including it
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=47cc1a2bf1b757dc388cd47f43dc64e5cc543918
---
libavutil/ppc/cpu.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
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
More information about the ffmpeg-cvslog
mailing list