diff options
author | Sean Bruno <sbruno@FreeBSD.org> | 2016-06-02 18:37:34 +0000 |
---|---|---|
committer | Sean Bruno <sbruno@FreeBSD.org> | 2016-06-02 18:37:34 +0000 |
commit | 2872755c3d84b50f20ed1f615bb46f8eddb45b63 (patch) | |
tree | 6e2ce4b04e0f38debfd4848c2d741ccd622e102f /emulators/qemu-devel | |
parent | 448fbc3a91517963ed5510766229f6a9d6e631ea (diff) | |
download | freebsd-ports-2872755c3d84b50f20ed1f615bb46f8eddb45b63.zip |
Fixup for macros that conflict with standard C++ function names.
PR: 209590
Submitted by: dim@
Diffstat (limited to 'emulators/qemu-devel')
-rw-r--r-- | emulators/qemu-devel/Makefile | 1 | ||||
-rw-r--r-- | emulators/qemu-devel/files/patch-include_qemu_atomic.h | 28 |
2 files changed, 29 insertions, 0 deletions
diff --git a/emulators/qemu-devel/Makefile b/emulators/qemu-devel/Makefile index 559a057ecb27..21bf4803da0f 100644 --- a/emulators/qemu-devel/Makefile +++ b/emulators/qemu-devel/Makefile @@ -3,6 +3,7 @@ PORTNAME= qemu DISTVERSION= 2.6.0 +PORTREVISION= 1 CATEGORIES= emulators MASTER_SITES= http://wiki.qemu.org/download/ PKGNAMESUFFIX= -devel diff --git a/emulators/qemu-devel/files/patch-include_qemu_atomic.h b/emulators/qemu-devel/files/patch-include_qemu_atomic.h new file mode 100644 index 000000000000..b4786e54485f --- /dev/null +++ b/emulators/qemu-devel/files/patch-include_qemu_atomic.h @@ -0,0 +1,28 @@ +--- include/qemu/atomic.h.orig 2016-06-02 18:20:47 UTC ++++ include/qemu/atomic.h +@@ -136,10 +136,12 @@ + /* Provide shorter names for GCC atomic builtins, return old value */ + #define atomic_fetch_inc(ptr) __atomic_fetch_add(ptr, 1, __ATOMIC_SEQ_CST) + #define atomic_fetch_dec(ptr) __atomic_fetch_sub(ptr, 1, __ATOMIC_SEQ_CST) ++#ifndef __cplusplus + #define atomic_fetch_add(ptr, n) __atomic_fetch_add(ptr, n, __ATOMIC_SEQ_CST) + #define atomic_fetch_sub(ptr, n) __atomic_fetch_sub(ptr, n, __ATOMIC_SEQ_CST) + #define atomic_fetch_and(ptr, n) __atomic_fetch_and(ptr, n, __ATOMIC_SEQ_CST) + #define atomic_fetch_or(ptr, n) __atomic_fetch_or(ptr, n, __ATOMIC_SEQ_CST) ++#endif + + /* And even shorter names that return void. */ + #define atomic_inc(ptr) ((void) __atomic_fetch_add(ptr, 1, __ATOMIC_SEQ_CST)) +@@ -330,10 +332,12 @@ + /* Provide shorter names for GCC atomic builtins. */ + #define atomic_fetch_inc(ptr) __sync_fetch_and_add(ptr, 1) + #define atomic_fetch_dec(ptr) __sync_fetch_and_add(ptr, -1) ++#ifndef __cplusplus + #define atomic_fetch_add __sync_fetch_and_add + #define atomic_fetch_sub __sync_fetch_and_sub + #define atomic_fetch_and __sync_fetch_and_and + #define atomic_fetch_or __sync_fetch_and_or ++#endif + #define atomic_cmpxchg __sync_val_compare_and_swap + + /* And even shorter names that return void. */ |