summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorLines
2023-02-12dns: prefer monotonic clock for timeoutsA. Wilcox-1/+2
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.
2019-12-22add uapi guards for new netinet/ip.h conflict with struct iphdrA. Wilcox-0/+2
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-04-10fcntl.h: define O_TTY_INIT to 0A. Wilcox-2/+3
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-03-12setvbuf: return failure if mode is invalidA. Wilcox-1/+3
POSIX requires setvbuf to return non-zero if `mode` is not one of _IONBF, _IOLBF, or _IOFBF.
2019-02-07locale: ensure dcngettext() preserves errnoA. Wilcox-0/+3
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 1b52863e244ecee5b5935b6d36bb9e6efe84c035, which enabled setting of errno from __map_file.
2018-08-28vfwprintf: honor field width with 'c' format typeA. Wilcox-1/+4
2018-08-27time: fix incorrect DST offset when using POSIX timezones without DSTA. Wilcox-1/+1
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.
2017-11-09fix getaddrinfo error code for non-numeric service with AI_NUMERICSERVA. Wilcox-1/+1
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-06-14getdate: correctly specify error numberA. Wilcox-1/+2
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-14catopen: set errno to EOPNOTSUPPA. Wilcox-0/+2
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.