Re: git: 1235d276b78a - main - lib{c,sys}: stop exposing errno symbol

From: Antoine Brodin <antoine_at_freebsd.org>
Date: Mon, 30 Sep 2024 06:33:18 UTC
On Fri, Sep 27, 2024 at 9:33 PM Brooks Davis <brooks@freebsd.org> wrote:
>
> The branch main has been updated by brooks:
>
> URL: https://cgit.FreeBSD.org/src/commit/?id=1235d276b78a769bded01d51c9bf3cdc480db9fb
>
> commit 1235d276b78a769bded01d51c9bf3cdc480db9fb
> Author:     Brooks Davis <brooks@FreeBSD.org>
> AuthorDate: 2024-09-27 19:27:46 +0000
> Commit:     Brooks Davis <brooks@FreeBSD.org>
> CommitDate: 2024-09-27 19:27:46 +0000
>
>     lib{c,sys}: stop exposing errno symbol
>
>     Officially since C11 (and in reality FreeBSD since 3.0 with commit
>     1b46cb523df3) errno has been defined to be a macro.  Rename the symbol
>     to __libsys_errno and move it to FBSDprivate_1.0 and confine it entierly
>     to libsys for use by libthr.  Add a FBSD_1.0 compat symbol for existing
>     binaries that were incorrectly linked to the errno symbol during
>     libc.so.7's lifetime.
>
>     This deliberately breaks linking software that directly links to errno.
>     Such software is broken and will fail in surprising ways if it becomes
>     threaded (e.g., if it triggers loading of a pam or nss module that
>     uses threads.)
>
>     Reviewed by:    kib
>     Differential Revision:  https://reviews.freebsd.org/D46780
> ---
>  lib/libsys/Makefile          |  2 ++
>  lib/libsys/Symbol.map        |  1 +
>  lib/libsys/Symbol.sys.map    |  1 -
>  lib/libsys/__error.c         | 10 +++++-----
>  lib/libthr/sys/thr_error.c   |  5 ++---
>  lib/libthr/thread/thr_rtld.c |  7 +++----
>  6 files changed, 13 insertions(+), 13 deletions(-)

Hello,

This breaks some ports:

https://pkg-status.freebsd.org/gohan05/data/maini386PR281667-default-foo/2024-09-27_21h05m12s/logs/errors/cdb-0.75.log
https://pkg-status.freebsd.org/gohan05/data/maini386PR281667-default-foo/2024-09-27_21h05m12s/logs/errors/checkpassword-0.90.log
https://pkg-status.freebsd.org/gohan05/data/maini386PR281667-default-foo/2024-09-27_21h05m12s/logs/errors/clockspeed-0.62_6.log
https://pkg-status.freebsd.org/gohan05/data/maini386PR281667-default-foo/2024-09-27_21h05m12s/logs/errors/copytape-1.0_1.log
https://pkg-status.freebsd.org/gohan05/data/maini386PR281667-default-foo/2024-09-27_21h05m12s/logs/errors/daemontools-0.76_19.log
https://pkg-status.freebsd.org/gohan05/data/maini386PR281667-default-foo/2024-09-27_21h05m12s/logs/errors/dot-forward-0.71_1.log
https://pkg-status.freebsd.org/gohan05/data/maini386PR281667-default-foo/2024-09-27_21h05m12s/logs/errors/faces-1.7.7_13.log
https://pkg-status.freebsd.org/gohan05/data/maini386PR281667-default-foo/2024-09-27_21h05m12s/logs/errors/fastforward-0.51_1.log
https://pkg-status.freebsd.org/gohan05/data/maini386PR281667-default-foo/2024-09-27_21h05m12s/logs/errors/gkermit-1.0_1.log
https://pkg-status.freebsd.org/gohan05/data/maini386PR281667-default-foo/2024-09-27_21h05m12s/logs/errors/ja-edict-19990714_6.log
https://pkg-status.freebsd.org/gohan05/data/maini386PR281667-default-foo/2024-09-27_21h05m12s/logs/errors/ja-mh-6.8.4.j3.05_7.log
https://pkg-status.freebsd.org/gohan05/data/maini386PR281667-default-foo/2024-09-27_21h05m12s/logs/errors/mess822-0.58_3.log
https://pkg-status.freebsd.org/gohan05/data/maini386PR281667-default-foo/2024-09-27_21h05m12s/logs/errors/mpeg_encode-1.5b.log
https://pkg-status.freebsd.org/gohan05/data/maini386PR281667-default-foo/2024-09-27_21h05m12s/logs/errors/pbasic-2.1_1.log
https://pkg-status.freebsd.org/gohan05/data/maini386PR281667-default-foo/2024-09-27_21h05m12s/logs/errors/qlogtools-3.1_4.log
https://pkg-status.freebsd.org/gohan05/data/maini386PR281667-default-foo/2024-09-27_21h05m12s/logs/errors/qmail-contrib-0.1_3.log
https://pkg-status.freebsd.org/gohan05/data/maini386PR281667-default-foo/2024-09-27_21h05m12s/logs/errors/qmail-dk-0.54_2.log
https://pkg-status.freebsd.org/gohan05/data/maini386PR281667-default-foo/2024-09-27_21h05m12s/logs/errors/qmail-rblchk-2.4.1_2.log
https://pkg-status.freebsd.org/gohan05/data/maini386PR281667-default-foo/2024-09-27_21h05m12s/logs/errors/qmailanalog-0.70_4.log
https://pkg-status.freebsd.org/gohan05/data/maini386PR281667-default-foo/2024-09-27_21h05m12s/logs/errors/queue-fix-1.4_1.log
https://pkg-status.freebsd.org/gohan05/data/maini386PR281667-default-foo/2024-09-27_21h05m12s/logs/errors/serialmail-0.75_4.log
https://pkg-status.freebsd.org/gohan05/data/maini386PR281667-default-foo/2024-09-27_21h05m12s/logs/errors/sliderule-1.0_11.log
https://pkg-status.freebsd.org/gohan05/data/maini386PR281667-default-foo/2024-09-27_21h05m12s/logs/errors/socket-1.2_1.log
https://pkg-status.freebsd.org/gohan05/data/maini386PR281667-default-foo/2024-09-27_21h05m12s/logs/errors/viz-1.1.1_2.log
https://pkg-status.freebsd.org/gohan05/data/maini386PR281667-default-foo/2024-09-27_21h05m12s/logs/errors/xml-format-0.2_1.log
https://pkg-status.freebsd.org/gohan05/data/maini386PR281667-default-foo/2024-09-27_21h05m12s/logs/errors/xspread-3.1.1c_5.log
https://pkg-status.freebsd.org/gohan05/data/maini386PR281667-default-foo/2024-09-27_21h05m12s/logs/errors/xtrojka-1.2.3_4.log

Cheers,

Antoine