It is in the POSIX standard: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/string.h.html#tag_13_51 and it is missing in 12.2-STABLE r366720.
It is used by multimedia/obs-studio: https://github.com/obsproject/obs-studio/issues/3835 So this port can't be updated pending addition of strerror_l.
https://reviews.freebsd.org/D27495
A commit references this bug: Author: kib Date: Wed Dec 16 09:02:11 UTC 2020 New revision: 368692 URL: https://svnweb.freebsd.org/changeset/base/368692 Log: Implement strerror_l(). Only for the arches that provide user-mode TLS. PR: 251651 Requested by: yuri Discussed with: emaste, jilles, tijl Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D27495 MFC after: 2 weeks Changes: head/include/xlocale/_string.h head/lib/libc/include/libc_private.h head/lib/libc/nls/msgcat.c head/lib/libc/string/Makefile.inc head/lib/libc/string/Symbol.map head/lib/libc/string/strerror.3 head/lib/libc/string/strerror.c
A commit in branch stable/12 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=d3912bec58d0b82509a0973cae02f156986d88fa commit d3912bec58d0b82509a0973cae02f156986d88fa Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2020-12-16 09:02:09 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2020-12-30 10:44:23 +0000 Implement strerror_l(). PR: 251651 MFC of r368692, r368723 (cherry picked from commit 675079b1ea61b310f3a42cb0d352a49c1780f89a) (cherry picked from commit 65bf3043365bd86fc5d4d387ad0c42217f11330b) include/string.h | 2 +- include/xlocale/_string.h | 1 + lib/libc/include/libc_private.h | 5 ++++ lib/libc/nls/msgcat.c | 9 ++++++- lib/libc/string/Makefile.inc | 1 + lib/libc/string/Symbol.map | 4 ++++ lib/libc/string/strerror.3 | 52 +++++++++++++++++++++++++++++++++-------- lib/libc/string/strerror.c | 46 +++++++++++++++++++++++++++--------- 8 files changed, 97 insertions(+), 23 deletions(-)