11 Commits
Author SHA1 Message Date
A. WilcoxandRich Felker 86373b4999 powerpc: update HWCAP bits for Power10
Linux kernel commit ee988c11acf6f9464b7b44e9a091bf6afb3b3a49 added two
new HWCAP bits: one for ARCH_3_1, which is the Power10 ISA revision, and
one for MMA, which is the optional Matrix Multiply Assist extension.
2025-05-27 12:19:38 -04:00
A. WilcoxandRich Felker 7d756e1c04 dns: prefer monotonic clock for timeouts
Before this commit, DNS timeouts always used CLOCK_REALTIME, which
could produce spurious timeouts or delays if wall time changed for
whatever reason.

Now we try CLOCK_MONOTONIC and only fall back to CLOCK_REALTIME when
it is unavailable.
2023-02-12 18:03:24 -05:00
A. WilcoxandRich Felker 0738e6c19f add uapi guards for new netinet/ip.h conflict with struct iphdr
This ensures that the musl definition of 'struct iphdr' does not conflict
with the Linux kernel UAPI definition of it.

Some software, i.e. net-tools, will not compile against 5.4 kernel headers
without this patch and the corresponding Linux kernel patch.
2019-12-22 12:45:48 -05:00
A. WilcoxandRich Felker 65c8be3804 fcntl.h: define O_TTY_INIT to 0
POSIX: "[If] either O_TTY_INIT is set in oflag or O_TTY_INIT has the
value zero, open() shall set any non-standard termios structure
terminal parameters to a state that provides conforming behavior."

The Linux kernel tty drivers always perform initialisation on their
devices to set known good termios values during the open(2) call.  This
means that setting O_TTY_INIT to zero is conforming.
2019-04-10 20:37:04 -04:00
A. WilcoxandRich Felker 00d3d577ca setvbuf: return failure if mode is invalid
POSIX requires setvbuf to return non-zero if `mode` is not one of _IONBF,
_IOLBF, or _IOFBF.
2019-03-12 16:44:41 -04:00
A. WilcoxandRich Felker 8d82971775 locale: ensure dcngettext() preserves errno
Some packages call gettext to format a message to be sent to perror.
If the currently set user locale points to a non-existent .mo file,
open via __map_file in dcngettext will set errno to ENOENT.

Maintainer's notes: Non-modification of errno is a documented part of
the interface contract for the GNU version of this function and likely
other versions. The issue being fixed here seems to be a regression
from commit 1b52863e24, which enabled
setting of errno from __map_file.
2019-02-07 12:41:16 -05:00
A. WilcoxandRich Felker 9cdaf1a86b vfwprintf: honor field width with 'c' format type 2018-08-28 21:31:05 -04:00
A. WilcoxandRich Felker 92c52644e0 time: fix incorrect DST offset when using POSIX timezones without DST
This manifests itself in mktime if tm_isdst = 1 and the current TZ= is
a POSIX timezone specification. mktime would see that tm_isdst was set
to 0 by __secs_to_zone, and subtract 'oppoff' (dst_off) - gmtoff from
the resultant time. This meant that mktime returned a time that was
exactly double the GMT offset of the desired timezone when tm_isdst
was = 1.
2018-08-27 19:55:56 -04:00
A. WilcoxandRich Felker 30fdda6c99 fix getaddrinfo error code for non-numeric service with AI_NUMERICSERV
If AI_NUMERICSERV is specified and a numeric service was not provided,
POSIX mandates getaddrinfo return EAI_NONAME. EAI_SERVICE is only for
services that cannot be used on the specified socket type.
2017-11-09 20:15:02 -05:00
A. WilcoxandRich Felker 1080008809 getdate: correctly specify error number
POSIX defines getdate error #5 as:
"An I/O error is encountered while reading the template file."

POSIX defines getdate error #7 as:
"There is no line in the template that matches the input."

This change correctly disambiguates between the two error conditions.
2017-06-14 19:50:58 -04:00
A. WilcoxandRich Felker af05173016 catopen: set errno to EOPNOTSUPP
Per 1003.1-2008 (2016 ed.), catopen must set errno on failure.

We set errno to EOPNOTSUPP because musl does not currently support
message catalogues.
2017-06-14 19:46:04 -04:00