forked from macports/macports-ports
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6c04934
commit a4705f6
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
devel/libcyaml/files/0001-data.h-use-_Static_assert-when-static_assert-undefin.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
From 2a5f98ed1d4d8e8b8c6c1850c5cbbe29dff08c94 Mon Sep 17 00:00:00 2001 | ||
From: barracuda156 <[email protected]> | ||
Date: Wed, 22 May 2024 14:43:57 +0800 | ||
Subject: [PATCH] data.h: use _Static_assert when static_assert undefined | ||
|
||
Fixes: https://github.com/tlsa/libcyaml/issues/230 | ||
--- | ||
src/data.h | 7 +++++++ | ||
1 file changed, 7 insertions(+) | ||
|
||
diff --git src/data.h src/data.h | ||
index 8b76a9c..4a00e4f 100644 | ||
--- src/data.h | ||
+++ src/data.h | ||
@@ -12,6 +12,13 @@ | ||
#ifndef CYAML_DATA_H | ||
#define CYAML_DATA_H | ||
|
||
+#include <assert.h> | ||
+#if !defined(static_assert) && (defined(__GNUC__) || defined(__clang__)) \ | ||
+ && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L \ | ||
+ && __STDC_VERSION__ <= 201710L | ||
+#define static_assert _Static_assert | ||
+#endif | ||
+ | ||
#include "cyaml/cyaml.h" | ||
#include "util.h" | ||
|