diff options
| author | Kyle Evans <kevans@FreeBSD.org> | 2022-04-13 00:29:54 +0000 |
|---|---|---|
| committer | Kyle Evans <kevans@FreeBSD.org> | 2022-04-21 22:33:21 +0000 |
| commit | 53fefea53f12f13ef53b639c7d2073ffc84523ab (patch) | |
| tree | 34f9c1148a71c3bfb18f005ee80b8c30c0f89ff6 | |
| parent | 13cc5276ea3914d6a9a9d4649490b4da356b540e (diff) | |
| download | src-53fefea53f12f13ef53b639c7d2073ffc84523ab.tar.gz src-53fefea53f12f13ef53b639c7d2073ffc84523ab.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
(cherry picked from commit 660c1892d5c90500d37f98185326c6287b2b61be)
| -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 148398bd6c91..9af0b3b646a0 100644 --- a/stand/userboot/userboot/main.c +++ b/stand/userboot/userboot/main.c @@ -69,6 +69,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) { |
