pull up static_assert-related changes from upstream repo to fix with
newer clang. pointers from natano, espie.
This commit is contained in:
parent
7d5b99de87
commit
c66e040ad8
29
x11/vlc/patches/patch-include_vlc_fixups_h
Normal file
29
x11/vlc/patches/patch-include_vlc_fixups_h
Normal file
@ -0,0 +1,29 @@
|
||||
$OpenBSD: patch-include_vlc_fixups_h,v 1.1 2016/03/06 10:45:34 sthen Exp $
|
||||
|
||||
Fixes with newer clang.
|
||||
|
||||
From 51ce6cdaf598754e617900994c1943c6cba6d604 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Guillem <thomas@gllm.fr>
|
||||
Date: Thu, 30 Apr 2015 15:29:50 +0200
|
||||
Subject: [PATCH] Fix build when using C99 and C++11
|
||||
|
||||
From 6faf9066670db6e0d241ead6a3926b2d9cc6a041 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Guillem <thomas@gllm.fr>
|
||||
Date: Mon, 14 Dec 2015 10:08:25 +0100
|
||||
Subject: [PATCH] compat: fix static_assert
|
||||
|
||||
--- include/vlc_fixups.h.orig Sun Mar 6 03:31:20 2016
|
||||
+++ include/vlc_fixups.h Sun Mar 6 03:32:06 2016
|
||||
@@ -239,8 +239,10 @@ static inline locale_t newlocale(int mask, const char
|
||||
}
|
||||
#endif
|
||||
|
||||
-#if !defined (HAVE_STATIC_ASSERT)
|
||||
-# define _Static_assert(x, s) ((void) sizeof (struct { unsigned:-!(x); }))
|
||||
+#if !defined (HAVE_STATIC_ASSERT) && !defined(__cpp_static_assert)
|
||||
+# define STATIC_ASSERT_CONCAT_(a, b) a##b
|
||||
+# define STATIC_ASSERT_CONCAT(a, b) STATIC_ASSERT_CONCAT_(a, b)
|
||||
+# define _Static_assert(x, s) extern char STATIC_ASSERT_CONCAT(static_assert_, __LINE__)[sizeof(struct { unsigned:-!(x); })]
|
||||
# define static_assert _Static_assert
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user