libtpms/tests/common
Stefan Berger 5695736b4f 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>
2025-04-28 12:16:21 -04:00

15 lines
232 B
Plaintext

# SPDX-License-Identifier: BSD-3-Clause
# Get the size of a file in bytes
#
# @1: filename
function get_filesize()
{
if [[ "$(uname -s)" =~ (Linux|CYGWIN_NT-|GNU) ]]; then
stat -c%s "$1"
else
# OpenBSD
stat -f%z "$1"
fi
}