1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-25 04:43:33 +00:00

Fix build with libc++ 3.8.0

VLC brings its own header for atomic operations which defines a whole
bunch of atomic macros, conflicting with the ones in the C++ standard
<atomic> header. This changeset works around those.

PR:		209722
Submitted by:	dim
This commit is contained in:
Thomas Zander 2016-06-01 06:17:51 +00:00
parent c2d922f037
commit d9a4fd5cae
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=416225
4 changed files with 69 additions and 0 deletions

View File

@ -0,0 +1,17 @@
--- include/vlc_atomic.h.orig 2014-08-14 07:20:03 UTC
+++ include/vlc_atomic.h
@@ -32,6 +32,14 @@
/*** Native C11 atomics ***/
# include <stdatomic.h>
+# elif defined (__cplusplus) && defined(_LIBCPP_VERSION) && _LIBCPP_VERSION >= 3800
+
+# include <atomic>
+
+using std::atomic_uint_least32_t;
+using std::atomic_uintptr_t;
+using std::atomic_int;
+
# else
# define ATOMIC_FLAG_INIT false

View File

@ -0,0 +1,19 @@
--- include/vlc_playlist.h.orig 2014-11-16 18:57:58 UTC
+++ include/vlc_playlist.h
@@ -24,13 +24,13 @@
#ifndef VLC_PLAYLIST_H_
#define VLC_PLAYLIST_H_
+#include <vlc_input.h>
+#include <vlc_events.h>
+
# ifdef __cplusplus
extern "C" {
# endif
-#include <vlc_input.h>
-#include <vlc_events.h>
-
TYPEDEF_ARRAY(playlist_item_t*, playlist_item_array_t)
struct intf_thread_t;

View File

@ -0,0 +1,22 @@
--- include/vlc_sout.h.orig 2014-11-16 18:57:58 UTC
+++ include/vlc_sout.h
@@ -28,6 +28,9 @@
#ifndef VLC_SOUT_H_
#define VLC_SOUT_H_
+#include <sys/types.h>
+#include <vlc_es.h>
+
/**
* \file
* This file defines structures and functions for stream output in vlc
@@ -37,9 +40,6 @@
extern "C" {
#endif
-#include <sys/types.h>
-#include <vlc_es.h>
-
/** Stream output instance (FIXME: should be private to src/ to avoid
* invalid unsynchronized access) */
struct sout_instance_t

View File

@ -0,0 +1,11 @@
--- modules/gui/qt4/dialogs/messages.hpp.orig 2014-08-14 07:20:04 UTC
+++ modules/gui/qt4/dialogs/messages.hpp
@@ -55,7 +55,7 @@ private:
void sinkMessage( const MsgEvent * );
bool matchFilter( const QString& );
- atomic_uint verbosity;
+ atomic_int verbosity;
static void MsgCallback( void *, int, const vlc_log_t *, const char *,
va_list );