Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/vlc: backport upstream patch to fix compat function for static_assert
@ 2016-09-24 18:55 Bernd Kuhls
  2016-10-11 15:05 ` Johan Oudinet
  2016-10-16 11:20 ` Thomas Petazzoni
  0 siblings, 2 replies; 3+ messages in thread
From: Bernd Kuhls @ 2016-09-24 18:55 UTC (permalink / raw)
  To: buildroot

Fixes
http://autobuild.buildroot.net/results/3b9/3b9d15f226057706c185270788050dace7b7b535/

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 package/vlc/0009-static-assert.patch | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 package/vlc/0009-static-assert.patch

diff --git a/package/vlc/0009-static-assert.patch b/package/vlc/0009-static-assert.patch
new file mode 100644
index 0000000..33cf054
--- /dev/null
+++ b/package/vlc/0009-static-assert.patch
@@ -0,0 +1,29 @@
+From: Thomas Guillem <thomas@gllm.fr>
+Date: Mon, 14 Dec 2015 09:08:25 +0000 (+0100)
+Subject: compat: fix static_assert
+X-Git-Url: http://git.videolan.org/?p=vlc.git;a=commitdiff_plain;h=6faf9066670db6e0d241ead6a3926b2d9cc6a041
+
+compat: fix static_assert
+
+It was not possible to use it outside of functions.
+
+Signed-off-by: R?mi Denis-Courmont <remi@remlab.net>
+(backported and re-based for vlc 2.2)
+ Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+---
+
+diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h
+index 213d3f3..bd798d0 100644
+--- a/include/vlc_fixups.h
++++ b/include/vlc_fixups.h
+@@ -273,7 +273,9 @@ static inline locale_t newlocale(int mask, const char * locale, locale_t base)
+ #endif
+ 
+ #if !defined (HAVE_STATIC_ASSERT)
+-# define _Static_assert(x, s) ((void) sizeof (struct { unsigned:-!(x); }))
++# 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
+ 
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-10-16 11:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-24 18:55 [Buildroot] [PATCH 1/1] package/vlc: backport upstream patch to fix compat function for static_assert Bernd Kuhls
2016-10-11 15:05 ` Johan Oudinet
2016-10-16 11:20 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox