commit: f36877ecf039c53ba43ca4ebcc8c465412d12fd6
Author: Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Tue Aug 13 12:44:19 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Aug 22 19:37:43 2024 +0000
URL:
https://gitweb.gentoo.org/proj/gentoo-functions.git/commit/?id=f36877ec
Check for EPOCHREALTIME support in a safer manner
Given that the EPOCHREALTIME variable loses its special properties if
unset, to compare two expansions of it to one another ought to be more
robust.
Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
functions.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/functions.sh b/functions.sh
index a47bb2b..b19831d 100644
--- a/functions.sh
+++ b/functions.sh
@@ -940,7 +940,7 @@ _update_pid()
_update_time()
{
# shellcheck disable=3028
- if [ "${BASH_VERSINFO:-0}" -ge 5 ]; then
+ if [ "${EPOCHREALTIME}" != "${EPOCHREALTIME}" ]; then
# shellcheck disable=2034,3045
_update_time()
{