diff options
Diffstat (limited to 'recipes-extended/upx/libucl/use-static-assert.patch')
| -rw-r--r-- | recipes-extended/upx/libucl/use-static-assert.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/recipes-extended/upx/libucl/use-static-assert.patch b/recipes-extended/upx/libucl/use-static-assert.patch new file mode 100644 index 00000000..bdf49003 --- /dev/null +++ b/recipes-extended/upx/libucl/use-static-assert.patch | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | From: Robert Luberda <robert@debian.org> | ||
| 2 | Date: Sat, 2 Jul 2016 22:23:20 +0200 | ||
| 3 | Subject: Switch to _Static_assert | ||
| 4 | |||
| 5 | Use _Static_assert for compile-time assertion to fix | ||
| 6 | build failures with gcc-6 (closes: #811707) | ||
| 7 | --- | ||
| 8 | acc/acc_defs.h | 6 ++++++ | ||
| 9 | 1 file changed, 6 insertions(+) | ||
| 10 | |||
| 11 | diff --git a/acc/acc_defs.h b/acc/acc_defs.h | ||
| 12 | index 866b7bd..5ee3761 100644 | ||
| 13 | --- a/acc/acc_defs.h | ||
| 14 | +++ b/acc/acc_defs.h | ||
| 15 | @@ -87,6 +87,9 @@ | ||
| 16 | |||
| 17 | /* This can be put into a header file but may get ignored by some compilers. */ | ||
| 18 | #if !defined(ACC_COMPILE_TIME_ASSERT_HEADER) | ||
| 19 | +# define ACC_COMPILE_TIME_ASSERT_HEADER(e) _Static_assert(e, #e); | ||
| 20 | +#endif | ||
| 21 | +#if !defined(ACC_COMPILE_TIME_ASSERT_HEADER) | ||
| 22 | # if (ACC_CC_AZTECC || ACC_CC_ZORTECHC) | ||
| 23 | # define ACC_COMPILE_TIME_ASSERT_HEADER(e) extern int __acc_cta[1-!(e)]; | ||
| 24 | # elif (ACC_CC_DMC || ACC_CC_SYMANTECC) | ||
| 25 | @@ -100,6 +103,9 @@ | ||
| 26 | |||
| 27 | /* This must appear within a function body. */ | ||
| 28 | #if !defined(ACC_COMPILE_TIME_ASSERT) | ||
| 29 | +# define ACC_COMPILE_TIME_ASSERT(e) _Static_assert(e, #e); | ||
| 30 | +#endif | ||
| 31 | +#if !defined(ACC_COMPILE_TIME_ASSERT) | ||
| 32 | # if (ACC_CC_AZTECC) | ||
| 33 | # define ACC_COMPILE_TIME_ASSERT(e) {typedef int __acc_cta_t[1-!(e)];} | ||
| 34 | # elif (ACC_CC_DMC || ACC_CC_PACIFICC || ACC_CC_SYMANTECC || ACC_CC_ZORTECHC) | ||
