From: Rich Felker Date: Sun, 22 Dec 2019 18:25:17 +0000 (-0500) Subject: spare archs without time32 legacy the cost of ioctl fallback conversions X-Git-Tag: v1.2.0~41 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=d01fdc777dd3b5ebcad351ee47d1984d28db31e4;p=oweals%2Fmusl.git spare archs without time32 legacy the cost of ioctl fallback conversions adding this condition makes the entire convert_ioctl_struct function and compat_map table statically unreachable, and thereby optimized out by dead code elimination, on archs where they are not needed. --- diff --git a/src/misc/ioctl.c b/src/misc/ioctl.c index aa748fb8..89477511 100644 --- a/src/misc/ioctl.c +++ b/src/misc/ioctl.c @@ -120,7 +120,7 @@ int ioctl(int fd, int req, ...) arg = va_arg(ap, void *); va_end(ap); int r = __syscall(SYS_ioctl, fd, req, arg); - if (req && r==-ENOTTY) { + if (SIOCGSTAMP != SIOCGSTAMP_OLD && req && r==-ENOTTY) { for (int i=0; i