diff options
author | Kyle Evans <kevans@FreeBSD.org> | 2022-04-13 00:29:54 +0000 |
---|---|---|
committer | Kyle Evans <kevans@FreeBSD.org> | 2022-04-13 00:33:54 +0000 |
commit | 660c1892d5c90500d37f98185326c6287b2b61be (patch) | |
tree | a6aa7f9301121c8d858f344d8eb7cc153d673c99 | |
parent | 454630c72556d45e401f29f56b3317c2fb0499a0 (diff) | |
download | src-660c1892d5c90500d37f98185326c6287b2b61be.tar.gz src-660c1892d5c90500d37f98185326c6287b2b61be.zip |
loader: userboot: provide a getsecs() implementation
We don't need it for userboot, but it avoids issues with BIND_NOW, so
just provide it. time(3) isn't defined but ends up being provided by
libc linked into the host process, which is generally fine.
PR: 262920
Reviewed by: imp, jhb
MFC after: 3 days
Diferential Revision: https://reviews.freebsd.org/D34758
-rw-r--r-- | stand/userboot/userboot/main.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/stand/userboot/userboot/main.c b/stand/userboot/userboot/main.c index 48c4e388b828..07630945cf80 100644 --- a/stand/userboot/userboot/main.c +++ b/stand/userboot/userboot/main.c @@ -70,6 +70,18 @@ delay(int usec) CALLBACK(delay, usec); } +time_t +getsecs(void) +{ + + /* + * userboot can't do netboot, so this implementation isn't strictly + * required. Defining it avoids issues with BIND_NOW, and it doesn't + * hurt to do it. + */ + return (time(NULL)); +} + void exit(int v) { |