From 637470c0dbbadf4b0d8b01c6c2179a4305f2b203 Mon Sep 17 00:00:00 2001 From: Loren Merritt Date: Sun, 16 Jul 2006 18:25:38 +0000 Subject: [PATCH] OpenBSD build fixes. patch by Vizeli Pascal (pvizeli at yahoo dot de) git-svn-id: svn://svn.videolan.org/x264/trunk@535 df754926-b1dd-0310-bc7b-ec298dee348c --- configure | 5 +++++ encoder/ratecontrol.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 43a98740..01f6cb14 100755 --- a/configure +++ b/configure @@ -83,6 +83,11 @@ case "$UNAMES" in SYS="NETBSD" LDFLAGS="$LDFLAGS -lm" ;; + OpenBSD) + SYS="OPENBSD" + CFLAGS="$CFLAGS -I/usr/X11R6/include" + LDFLAGS="$LDFLAGS -lm" + ;; Linux) SYS="LINUX" CFLAGS="$CFLAGS -DHAVE_MALLOC_H" diff --git a/encoder/ratecontrol.c b/encoder/ratecontrol.c index 410fdd12..9a7e25d2 100644 --- a/encoder/ratecontrol.c +++ b/encoder/ratecontrol.c @@ -35,13 +35,16 @@ #include "common/cpu.h" #include "ratecontrol.h" -#if defined(SYS_FREEBSD) || defined(SYS_BEOS) || defined(SYS_NETBSD) +#if defined(SYS_FREEBSD) || defined(SYS_BEOS) || defined(SYS_NETBSD) || defined(SYS_OPENBSD) #define exp2f(x) powf( 2, (x) ) #endif #if defined(SYS_MACOSX) #define exp2f(x) (float)pow( 2, (x) ) #define sqrtf sqrt #endif +#if defined(SYS_OPENBSD) +#define isfinite finite +#endif #if defined(_MSC_VER) #define isfinite _finite #endif -- 2.40.0