git: 81245a77f0a3 - main - libc: compile _once in libsys

From: Brooks Davis <brooks_at_FreeBSD.org>
Date: Mon, 05 Feb 2024 20:38:37 UTC
The branch main has been updated by brooks:

URL: https://cgit.FreeBSD.org/src/commit/?id=81245a77f0a34f80f8097ed461d785a9074855e3

commit 81245a77f0a34f80f8097ed461d785a9074855e3
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2023-11-21 18:30:43 +0000
Commit:     Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2024-02-05 20:34:56 +0000

    libc: compile _once in libsys
    
    auxv support requires _once(), but we don't want the libsys version
    stomping on the libc version should they diverge in the future.  We
    could rename it entierly, but for now just hook it in via Makefile.sys.
    
    Reviewed by:    kib, emaste, imp
    Pull Request:   https://github.com/freebsd/freebsd-src/pull/908
---
 lib/libc/gen/Makefile.inc             | 1 -
 lib/libsys/Makefile.sys               | 1 +
 lib/{libc/gen => libsys}/_once_stub.c | 0
 3 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc
index 9eeab36f7d00..ae5a12d8b668 100644
--- a/lib/libc/gen/Makefile.inc
+++ b/lib/libc/gen/Makefile.inc
@@ -9,7 +9,6 @@ CONFSPACKAGE=   runtime
 SRCS+=	__getosreldate.c \
 	__pthread_mutex_init_calloc_cb_stub.c \
 	__xuname.c \
-	_once_stub.c \
 	_pthread_stubs.c \
 	_rand48.c \
 	_spinlock_stub.c \
diff --git a/lib/libsys/Makefile.sys b/lib/libsys/Makefile.sys
index e31a30d731bb..ef800e4d2445 100644
--- a/lib/libsys/Makefile.sys
+++ b/lib/libsys/Makefile.sys
@@ -32,6 +32,7 @@ PSEUDO+= _clock_gettime.o _gettimeofday.o
 # Sources common to both syscall interfaces:
 SRCS+=	\
 	__error.c \
+	_once_stub.c \
 	interposing_table.c
 
 SRCS+= getdents.c lstat.c mknod.c stat.c
diff --git a/lib/libc/gen/_once_stub.c b/lib/libsys/_once_stub.c
similarity index 100%
rename from lib/libc/gen/_once_stub.c
rename to lib/libsys/_once_stub.c