Skip to content

Commit

Permalink
Borrow upstream gnulib commit 0814a293 to fix static_assert on
Browse files Browse the repository at this point in the history
Solaris 11.4.
  • Loading branch information
schmonz committed Jun 11, 2023
1 parent f515f17 commit 0a58725
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 1 deletion.
4 changes: 3 additions & 1 deletion devel/libidn2/distinfo
@@ -1,5 +1,7 @@
$NetBSD: distinfo,v 1.13 2022/10/30 11:17:47 wiz Exp $
$NetBSD: distinfo,v 1.14 2023/06/11 00:41:07 schmonz Exp $

BLAKE2s (libidn2-2.3.4.tar.gz) = 945e961371d041f46f684e2d9690c819c27accd1c34fbe0c885bd12ebc3b1e93
SHA512 (libidn2-2.3.4.tar.gz) = a6e90ccef56cfd0b37e3333ab3594bb3cec7ca42a138ca8c4f4ce142da208fa792f6c78ca00c01001c2bc02831abcbaf1cf9bcc346a5290fd7b30708f5a462f3
Size (libidn2-2.3.4.tar.gz) = 2083823 bytes
SHA1 (patch-config.h.in) = e816f95edf082f0dbaf924216ee53b9ed7afaf9f
SHA1 (patch-gl_m4_assert__h.m4) = 29e36c8b7604f266825759b2a18223b11ae446e8
18 changes: 18 additions & 0 deletions devel/libidn2/patches/patch-config.h.in
@@ -0,0 +1,18 @@
$NetBSD: patch-config.h.in,v 1.1 2023/06/11 00:41:07 schmonz Exp $

Borrow upstream gnulib commit 0814a293:
Make static_assert work on Solaris 11.4.

--- config.h.in.orig 2022-10-23 13:43:26.000000000 +0000
+++ config.h.in
@@ -1427,4 +1427,10 @@
&& __GNUG__ < 6 && __clang_major__ < 6)))
#include <assert.h>
#undef/**/assert
+ /* Solaris 11.4 <assert.h> defines static_assert as a macro with 2 arguments.
+ We need it also to be invocable with a single argument. */
+ #if defined __sun && (__STDC_VERSION__ - 0 >= 201112L) && !defined __cplusplus
+ #undef static_assert
+ #define static_assert _Static_assert
+ #endif
#endif
19 changes: 19 additions & 0 deletions devel/libidn2/patches/patch-gl_m4_assert__h.m4
@@ -0,0 +1,19 @@
$NetBSD: patch-gl_m4_assert__h.m4,v 1.1 2023/06/11 00:41:07 schmonz Exp $

Borrow upstream gnulib commit 0814a293:
Make static_assert work on Solaris 11.4.

--- gl/m4/assert_h.m4.orig 2022-10-23 13:39:39.000000000 +0000
+++ gl/m4/assert_h.m4
@@ -57,5 +57,11 @@ AC_DEFUN([gl_ASSERT_H],
&& __GNUG__ < 6 && __clang_major__ < 6)))
#include <assert.h>
#undef/**/assert
+ /* Solaris 11.4 <assert.h> defines static_assert as a macro with 2 arguments.
+ We need it also to be invocable with a single argument. */
+ #if defined __sun && (__STDC_VERSION__ - 0 >= 201112L) && !defined __cplusplus
+ #undef static_assert
+ #define static_assert _Static_assert
+ #endif
#endif])
])

0 comments on commit 0a58725

Please sign in to comment.