mirror of
https://github.com/stefanberger/libtpms
synced 2025-08-23 16:01:32 +00:00

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>
15 lines
232 B
Plaintext
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
|
|
}
|