Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Aug 2022 18:54:54 GMT
From:      Matthias Andree <mandree@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org
Subject:   git: 4d45e445eb83 - 2022Q3 - devel/xxhash: fix static_assert to _Static_assert
Message-ID:  <202208131854.27DIssHU072852@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch 2022Q3 has been updated by mandree:

URL: https://cgit.FreeBSD.org/ports/commit/?id=4d45e445eb831ec162b4d92e89a7b83878d14f9d

commit 4d45e445eb831ec162b4d92e89a7b83878d14f9d
Author:     Thierry Dussuet <thierry.dussuet@protonmail.com>
AuthorDate: 2022-08-13 18:35:43 +0000
Commit:     Matthias Andree <mandree@FreeBSD.org>
CommitDate: 2022-08-13 18:52:06 +0000

    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
    
    (cherry picked from commit 8a4d5e26a9721eae2deba5fef794a2e593170658)
---
 devel/xxhash/Makefile             |  2 +-
 devel/xxhash/files/patch-xxhash.h | 12 ++++++++++++
 2 files changed, 13 insertions(+), 1 deletion(-)

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202208131854.27DIssHU072852>