Define old stat functions only if needed
When HAVE_LONG_LONG_OFF_T is defined, those old stat functions aren't used and strace won't link since they use realprintstat which isn't defined when HAVE_LONG_LONG_OFF_T is defined. * file.c (convertoldstat, sys_oldstat, sys_oldfstat, sys_oldlstat): Define only if HAVE_LONG_LONG_OFF_T isn't defined.
This commit is contained in:
parent
d0cd4436b0
commit
a13b3fea4f
12
file.c
12
file.c
@ -1229,7 +1229,8 @@ printstat64(struct tcb *tcp, long addr)
|
||||
}
|
||||
#endif /* HAVE_STAT64 */
|
||||
|
||||
#if defined(LINUX) && defined(HAVE_STRUCT___OLD_KERNEL_STAT)
|
||||
#if defined(LINUX) && defined(HAVE_STRUCT___OLD_KERNEL_STAT) \
|
||||
&& !defined(HAVE_LONG_LONG_OFF_T)
|
||||
static void
|
||||
convertoldstat(const struct __old_kernel_stat *oldbuf, struct stat *newbuf)
|
||||
{
|
||||
@ -1346,7 +1347,8 @@ sys_newfstatat(struct tcb *tcp)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(LINUX) && defined(HAVE_STRUCT___OLD_KERNEL_STAT)
|
||||
#if defined(LINUX) && defined(HAVE_STRUCT___OLD_KERNEL_STAT) \
|
||||
&& !defined(HAVE_LONG_LONG_OFF_T)
|
||||
int
|
||||
sys_oldstat(struct tcb *tcp)
|
||||
{
|
||||
@ -1390,7 +1392,8 @@ sys_fstat64(struct tcb *tcp)
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(LINUX) && defined(HAVE_STRUCT___OLD_KERNEL_STAT)
|
||||
#if defined(LINUX) && defined(HAVE_STRUCT___OLD_KERNEL_STAT) \
|
||||
&& !defined(HAVE_LONG_LONG_OFF_T)
|
||||
int
|
||||
sys_oldfstat(struct tcb *tcp)
|
||||
{
|
||||
@ -1434,7 +1437,8 @@ sys_lstat64(struct tcb *tcp)
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(LINUX) && defined(HAVE_STRUCT___OLD_KERNEL_STAT)
|
||||
#if defined(LINUX) && defined(HAVE_STRUCT___OLD_KERNEL_STAT) \
|
||||
&& !defined(HAVE_LONG_LONG_OFF_T)
|
||||
int
|
||||
sys_oldlstat(struct tcb *tcp)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user