aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThierry Dussuet <thierry.dussuet@protonmail.com>2022-08-13 18:35:43 +0000
committerMatthias Andree <mandree@FreeBSD.org>2022-08-13 18:43:27 +0000
commit8a4d5e26a9721eae2deba5fef794a2e593170658 (patch)
tree6760e598e34d887e49d0c31c68f2f6ff2b5b9fa7
parentee82cc6697b519e129aa645fc35ddc75561ee503 (diff)
downloadports-8a4d5e26a9721eae2deba5fef794a2e593170658.tar.gz
ports-8a4d5e26a9721eae2deba5fef794a2e593170658.zip
devel/xxhash: fix static_assert to _Static_assert
This fixes C11+ users of xxhash that do not #include <assert.h> PR: 265819 Approved by: portmgr@ (blanket, one-line fix to unbreak py-borgbackup) MFH: 2022Q3
-rw-r--r--devel/xxhash/Makefile2
-rw-r--r--devel/xxhash/files/patch-xxhash.h12
2 files changed, 13 insertions, 1 deletions
diff --git a/devel/xxhash/Makefile b/devel/xxhash/Makefile
index aa971e1fd084..988561039bf0 100644
--- a/devel/xxhash/Makefile
+++ b/devel/xxhash/Makefile
@@ -1,6 +1,6 @@
PORTNAME= xxhash
PORTVERSION= 0.8.1
-PORTREVISION= 1
+PORTREVISION= 2
DISTVERSIONPREFIX= v
CATEGORIES= devel
diff --git a/devel/xxhash/files/patch-xxhash.h b/devel/xxhash/files/patch-xxhash.h
new file mode 100644
index 000000000000..d005011ddc4f
--- /dev/null
+++ b/devel/xxhash/files/patch-xxhash.h
@@ -0,0 +1,12 @@
+--- xxhash.h.orig 2022-08-13 18:58:45.930785000 +0200
++++ xxhash.h 2022-08-13 18:59:08.416809000 +0200
+@@ -1546,8 +1546,7 @@
+ /* note: use after variable declarations */
+ #ifndef XXH_STATIC_ASSERT
+ # if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) /* C11 */
+-# include <assert.h>
+-# define XXH_STATIC_ASSERT_WITH_MESSAGE(c,m) do { static_assert((c),m); } while(0)
++# define XXH_STATIC_ASSERT_WITH_MESSAGE(c,m) do { _Static_assert((c),m); } while(0)
+ # elif defined(__cplusplus) && (__cplusplus >= 201103L) /* C++11 */
+ # define XXH_STATIC_ASSERT_WITH_MESSAGE(c,m) do { static_assert((c),m); } while(0)
+ # else