From: Francesco Paolo Lovergine <frankie@debian.org>
Date: Sat, 14 May 2022 03:37:13 +0800
Subject: Add support for kFreeBSD architectures.

---
 configure.ac   | 2 +-
 hdf/src/hdfi.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 88c9787..68507dc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -864,7 +864,7 @@ AC_CHECK_FUNCS([fork system vfork wait])
 ## These header files should probably be generated by autoconf instead
 ## of being copied depending upon the host.
 case "$host" in
-  *-linux*)             BAR="linux"       ;;
+  *-linux*|*-k*bsd*-gnu|*-gnu*)BAR="linux"       ;;
   *-freebsd*)           BAR="fbsd"        ;;
   *-ibm-aix*)           BAR="aix"         ;;
   sparc64-*-solaris2*)  BAR="solaris64"   ;;
diff --git a/hdf/src/hdfi.h b/hdf/src/hdfi.h
index 3dc06c8..4df3d68 100644
--- a/hdf/src/hdfi.h
+++ b/hdf/src/hdfi.h
@@ -1392,7 +1392,7 @@ typedef long              hdf_pint_t;   /* an integer the same size as a pointer
 /*-----------------------------------------------------*/
 #endif /*power PC 5 64 */
 /* Linux 64 */
-#if defined(__linux__) && defined __x86_64__  && !(defined  SUN)  /* i.e. 64-bit Linux  but not SunOS on Intel */
+#if defined(__GLIBC__) && defined __x86_64__  && !(defined  SUN)  /* i.e. 64-bit Linux  but not SunOS on Intel */
 
 #ifdef GOT_MACHINE
 If you get an error on this line more than one machine type has been defined.
