On Debian GNU/kFreeBSD 7.11, I see this compilation error:

../../../gettext-tools/gnulib-tests/test-sys_stat-h.c:343:1: error: static 
assertion failed: "static assertion failed"

This patch fixes it.


2025-05-03  Bruno Haible  <br...@clisp.org>

        tests: Avoid compilation errors on GNU/kFreeBSD.
        * tests/test-sys_stat-h.c: Disable blksize_t assertion on GNU/kFreeBSD.
        * tests/test-sys_types-h.c: Likewise.

diff --git a/tests/test-sys_stat-h.c b/tests/test-sys_stat-h.c
index 510aa21ea3..9c8ceb7c7c 100644
--- a/tests/test-sys_stat-h.c
+++ b/tests/test-sys_stat-h.c
@@ -339,7 +339,7 @@ struct timespec st;
 static_assert (TYPE_SIGNED (off_t));
 
 /* POSIX requires that blksize_t is a signed integer type.  */
-#if !defined __ANDROID__
+#if !(defined __ANDROID__ || (defined __FreeBSD_kernel__ && !defined 
__FreeBSD__))
 static_assert (TYPE_SIGNED (blksize_t));
 #endif
 
diff --git a/tests/test-sys_types-h.c b/tests/test-sys_types-h.c
index ab54d5d3bb..2a64fb21cf 100644
--- a/tests/test-sys_types-h.c
+++ b/tests/test-sys_types-h.c
@@ -46,7 +46,7 @@ static_assert (TYPE_SIGNED (off_t));
 static_assert (TYPE_SIGNED (off64_t));
 
 /* POSIX requires that blksize_t is a signed integer type.  */
-#if !defined __ANDROID__
+#if !(defined __ANDROID__ || (defined __FreeBSD_kernel__ && !defined 
__FreeBSD__))
 static_assert (TYPE_SIGNED (blksize_t));
 #endif
 




Reply via email to