strace doesn't build with older glibc versions (loop.c breaks)
vapier at gentoo.org
Mon Dec 16 17:20:07 UTC 2013
On Monday 16 December 2013 07:29:45 Rolf Eike Beer wrote:
> I try to build strace 4.8 against an old glibc (2.3.4). This breaks
> multiple times in loop.c. The failures I found so far are:
> -the glibc <linux/loop.h> forbids the header to be used from glibc using
> programs, because glibc uses a 32 bit dev_t, which would cause wrong struct
> layout in loop_info. I fixed this by this before including <linux/loop.h>:
there is no "glibc linux/loop.h". what you're describing is actually the
kernel's loop.h, and it's from the pre-userspace sanitization days.
the kernel header linux/loop.h doesn't use dev_t, it uses __kernel_old_dev_t.
it was fixed here:
Author: Andries E. Brouwer <andries.brouwer at cwi.nl>
Date: Fri Apr 18 03:18:49 2003 -0700
that was first released in linux-2.5.68 in Apr 2003.
so the question really is, do we care about linux systems using kernel headers
that are more than a decade old ? i think the sane answer is "no".
it would be easy to add a check like so though:
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
int loop_ioctl(struct tcb *tcp, long code, long arg)
/* Your system is too old for us to care. */
... existing code ...
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 836 bytes
Desc: This is a digitally signed message part.
More information about the Strace-devel