Use __sync atomic op on sparc64.

from Brad (maintainer)
This commit is contained in:
ajacoutot 2016-01-02 07:49:19 +00:00
parent 5a18c2e184
commit 86adc8f24c
2 changed files with 5 additions and 5 deletions

View File

@ -1,11 +1,11 @@
# $OpenBSD: Makefile,v 1.35 2015/12/25 07:51:36 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.36 2016/01/02 07:49:19 ajacoutot Exp $
COMMENT= free H.264/MPEG-4 AVC encoder
V= 20150728
DISTNAME= x264-snapshot-${V}-2245
PKGNAME= x264-${V}
REVISION= 0
REVISION= 1
CATEGORIES= multimedia
MASTER_SITES= http://downloads.videolan.org/pub/videolan/x264/snapshots/
EXTRACT_SUFX= .tar.bz2

View File

@ -1,13 +1,13 @@
$OpenBSD: patch-common_osdep_h,v 1.4 2015/12/25 07:51:37 ajacoutot Exp $
$OpenBSD: patch-common_osdep_h,v 1.5 2016/01/02 07:49:19 ajacoutot Exp $
--- common/osdep.h.orig Tue Jul 28 16:45:03 2015
+++ common/osdep.h Wed Dec 23 21:39:40 2015
+++ common/osdep.h Fri Dec 25 03:30:17 2015
@@ -234,7 +234,8 @@ int x264_threading_init( void );
static ALWAYS_INLINE int x264_pthread_fetch_and_add( int *val, int add, x264_pthread_mutex_t *mutex )
{
#if HAVE_THREAD
-#if defined(__GNUC__) && (__GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ > 0) && ARCH_X86
+#if defined(__GNUC__) && (__GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ > 0) &&\
+ (ARCH_ALPHA || ARCH_MIPS || ARCH_PPC || ARCH_SPARC || ARCH_X86 || ARCH_X86_64)
+ (ARCH_ALPHA || ARCH_MIPS || ARCH_PPC || ARCH_SPARC64 || ARCH_X86 || ARCH_X86_64)
return __sync_fetch_and_add( val, add );
#else
x264_pthread_mutex_lock( mutex );