mirror of
https://anongit.gentoo.org/git/repo/gentoo.git
synced 2025-07-22 06:57:59 +02:00
acpid comes with its own implementation of isfdtype() for standard libraries which do not define it, like musl. This implementation used LFS interfaces, which are now deprecated and which since musl-1.2.4 no longer are a part of the _GNU_SOURCE feature set. musl documentation says "just switch to standard interfaces" so let's do just that. Closes: https://bugs.gentoo.org/906189 Signed-off-by: Marek Szuba <marecki@gentoo.org>
19 lines
480 B
Diff
19 lines
480 B
Diff
Since version 1.2.4 musl no longer enables legacy LFS interfaces as part
|
|
of _GNU_SOURCE, and will remove them altogether in a future release [1].
|
|
Just switch to the standard interfaces.
|
|
|
|
[1] https://musl.libc.org/releases.html
|
|
|
|
--- a/sock.c
|
|
+++ b/sock.c
|
|
@@ -54,8 +54,8 @@
|
|
static int
|
|
isfdtype(int fd, int fdtype)
|
|
{
|
|
- struct stat64 st;
|
|
- if (fstat64(fd, &st) != 0)
|
|
+ struct stat st;
|
|
+ if (fstat(fd, &st) != 0)
|
|
return -1;
|
|
return ((st.st_mode & S_IFMT) == (mode_t)fdtype);
|
|
}
|