From: Roland McGrath Date: Thu, 5 Jul 2007 20:03:16 +0000 (+0000) Subject: 2007-07-05 Roland McGrath X-Git-Tag: v4.5.18~204 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4bfa6266eb6c67fce50907b427dff6bbd9e93794;p=strace 2007-07-05 Roland McGrath * strace.c (strace_fopen): [_LFS64_LARGEFILE]: Use fopen64. Fixes Debian#385310. --- diff --git a/strace.c b/strace.c index 6ee5b6a7..d6423ef2 100644 --- a/strace.c +++ b/strace.c @@ -236,13 +236,19 @@ swap_uid(void) #endif } +#if _LFS64_LARGEFILE +# define fopen_for_output fopen64 +#else +# define fopen_for_output fopen +#endif + static FILE * strace_fopen(const char *path, const char *mode) { FILE *fp; swap_uid(); - if ((fp = fopen(path, mode)) == NULL) + if ((fp = fopen_for_output(path, mode)) == NULL) fprintf(stderr, "%s: can't fopen '%s': %s\n", progname, path, strerror(errno)); swap_uid();