From a923c6914dbb0d5ce088a972bee054d995313853 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 3 May 2025 12:27:53 +0200 Subject: [PATCH] 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. --- ChangeLog | 6 ++++++ tests/test-sys_stat-h.c | 2 +- tests/test-sys_types-h.c | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index c33aae4a7a..c0abffa5bc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2025-05-03 Bruno Haible + + 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. + 2025-05-02 Collin Funk doc: Update documentation for 'open' errno discrepancies. 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 -- 2.39.5