git: 163951959866 - stable/13 - MFC: libmagic: Unbreak for older FreeBSD releases.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 13 Jan 2025 04:25:36 UTC
The branch stable/13 has been updated by delphij:
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(+)
diff --git a/lib/libmagic/config.h b/lib/libmagic/config.h
index 12cd382ab9bb..d642880d6096 100644
--- a/lib/libmagic/config.h
+++ b/lib/libmagic/config.h
@@ -1,6 +1,9 @@
/* config.h. Generated from config.h.in by configure. */
/* config.h.in. Generated from configure.ac by autoheader. */
+/* FreeBSD */
+#include <osreldate.h>
+
/* Define if building universal (internal helper macro) */
/* #undef AC_APPLE_UNIVERSAL_BUILD */
@@ -21,8 +24,10 @@
/* Define to 1 if you have the <byteswap.h> header file. */
#ifndef __APPLE__ /* Cross building tools on macOS */
+#if __FreeBSD_version >= 1400079 || (__FreeBSD_version < 1400000 && __FreeBSD_version >= 1302500)
#define HAVE_BYTESWAP_H 1
#endif
+#endif
/* Define to 1 if you have the <bzlib.h> header file. */
/* #undef HAVE_BZLIB_H */