In 90474518912f we are pretending that byteswap.h does not exist on FreeBSD. Ideally we should be testing if __FreeBSD_version is greater than or equal to 1400079 (the bump after byteswap.h introduction) and derive the HAVE_BYTESWAP from that.
Philip reports that builds are failing on an old 13.x based jail at cluster. Potentially we could do something like: ``` #include <osreldate.h> [...] #ifndef __APPLE__ #if __FreeBSD_version >= 1400079 || (__FreeBSD_version < 1400000 && __FreeBSD_version >= 1302500) #define HAVE_BYTESWAP_H 1 #endif #endif ```
seems good to me. libmagic likely is kinda broken if this dance is needed, but it's maybe the best way forward.
Cluster builds are working again. I only had to put a newer base.txz in the correct place. Thanks for the hint. :) I believe we formally support building on any earlier revision of the same branch, so we should have a bridge like this. Thank you! This looks good to me.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=7f8f120439b77e60a1070d87f4dc6cb9a43d0335 commit 7f8f120439b77e60a1070d87f4dc6cb9a43d0335 Author: Xin LI <delphij@FreeBSD.org> AuthorDate: 2025-01-08 04:42:16 +0000 Commit: Xin LI <delphij@FreeBSD.org> CommitDate: 2025-01-08 04:42:16 +0000 libmagic: Unbreak for older FreeBSD releases. byteswap.h is introduced in FreeBSD 13.2 but was not available in earlier versions. In order to support upgrading from an earlier FreeBSD release we would need to tell the build system that fact. PR: bin/273736 Reported by: philip MFC after: 3 days lib/libmagic/config.h | 5 +++++ 1 file changed, 5 insertions(+)
A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=e6de39be80e2283517f3c51d3d238d851435898e commit e6de39be80e2283517f3c51d3d238d851435898e Author: Xin LI <delphij@FreeBSD.org> AuthorDate: 2025-01-08 04:42:16 +0000 Commit: Xin LI <delphij@FreeBSD.org> CommitDate: 2025-01-13 04:24:19 +0000 MFC: libmagic: Unbreak for older FreeBSD releases. PR: bin/273736 Reported by: philip (cherry picked from commit 7f8f120439b77e60a1070d87f4dc6cb9a43d0335) lib/libmagic/config.h | 5 +++++ 1 file changed, 5 insertions(+)
A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=163951959866377ebf6d9af84a412dd22b1a8983 commit 163951959866377ebf6d9af84a412dd22b1a8983 Author: Xin LI <delphij@FreeBSD.org> AuthorDate: 2025-01-13 04:25:29 +0000 Commit: Xin LI <delphij@FreeBSD.org> CommitDate: 2025-01-13 04:25:29 +0000 MFC: libmagic: Unbreak for older FreeBSD releases. PR: bin/273736 Reported by: philip (cherry picked from commit 7f8f120439b77e60a1070d87f4dc6cb9a43d0335) lib/libmagic/config.h | 5 +++++ 1 file changed, 5 insertions(+)