git: cb72d028438f - stable/15 - libc: properly reference setgroups@FBSD_1.0 in initgroups@FBSD_1.0
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 23 Sep 2025 15:51:08 UTC
The branch stable/15 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=cb72d028438fe7e9c0ac76fe7da996b88fef6ed1 commit cb72d028438fe7e9c0ac76fe7da996b88fef6ed1 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2025-09-20 23:50:47 +0000 Commit: Olivier Certner <olce@FreeBSD.org> CommitDate: 2025-09-23 15:50:33 +0000 libc: properly reference setgroups@FBSD_1.0 in initgroups@FBSD_1.0 by forwarding the reference to libsys syscall symbol, for the libc.so case. Reviewed and tested by: kevans Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D52672 (cherry picked from commit f72908c94df9a256422790d4e2a60c9c33a35f2d) --- lib/libc/gen/gen-compat.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/libc/gen/gen-compat.h b/lib/libc/gen/gen-compat.h index dac8f54b45a2..74678301af6f 100644 --- a/lib/libc/gen/gen-compat.h +++ b/lib/libc/gen/gen-compat.h @@ -52,6 +52,12 @@ int freebsd11_getmntinfo(struct freebsd11_statfs **, int); char *freebsd11_devname(__uint32_t dev, __mode_t type); char *freebsd11_devname_r(__uint32_t dev, __mode_t type, char *buf, int len); -int freebsd14_setgroups(int gidsize, const __gid_t *gidset); +#define F14SG int freebsd14_setgroups(int gidsize, const __gid_t *gidset) +#ifdef PIC +static F14SG __attribute__((__weakref__("setgroups@FBSD_1.0"))); +#else +F14SG; +#endif +#undef F14SG #endif /* _GEN_COMPAT_H_ */