openbsd-ports/x11/vlc/patches/patch-include_vlc_common_h
2013-01-03 03:05:47 +00:00

22 lines
760 B
Plaintext

$OpenBSD: patch-include_vlc_common_h,v 1.3 2013/01/03 03:07:29 brad Exp $
--- include/vlc_common.h.orig Mon Dec 31 21:37:48 2012
+++ include/vlc_common.h Mon Dec 31 21:39:40 2012
@@ -659,7 +659,7 @@ static inline uint16_t bswap16 (uint16_t x)
VLC_USED
static inline uint32_t bswap32 (uint32_t x)
{
-#if VLC_GCC_VERSION(4,3)
+#if VLC_GCC_VERSION(4,3) || defined(__clang__)
return __builtin_bswap32 (x);
#else
return ((x & 0x000000FF) << 24)
@@ -673,7 +673,7 @@ static inline uint32_t bswap32 (uint32_t x)
VLC_USED
static inline uint64_t bswap64 (uint64_t x)
{
-#if VLC_GCC_VERSION(4,3)
+#if VLC_GCC_VERSION(4,3) || defined(__clang__)
return __builtin_bswap64 (x);
#elif !defined (__cplusplus)
return ((x & 0x00000000000000FF) << 56)