tpm2 + test: Make it compilable on Debian GNU Hurd

The simple changes make it compilable on GNU Hurd where it is currently
failing to build.

Link: https://buildd.debian.org/status/package.php?p=libtpms&suite=sid
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
This commit is contained in:
Stefan Berger 2025-04-28 10:49:30 -04:00 committed by Stefan Berger
parent 3a63c3f3df
commit 5695736b4f
2 changed files with 2 additions and 2 deletions

View File

@ -89,7 +89,7 @@
#else
# include <endian.h>
#endif
#if defined __linux__ || defined __CYGWIN__
#if defined __linux__ || defined __CYGWIN__ || defined __gnu_hurd__
#if __BYTE_ORDER == __LITTLE_ENDIAN
#define BIG_ENDIAN_TPM NO
#endif

View File

@ -5,7 +5,7 @@
# @1: filename
function get_filesize()
{
if [[ "$(uname -s)" =~ (Linux|CYGWIN_NT-) ]]; then
if [[ "$(uname -s)" =~ (Linux|CYGWIN_NT-|GNU) ]]; then
stat -c%s "$1"
else
# OpenBSD