]> granicus.if.org Git - strace/commitdiff
2007-07-05 Roland McGrath <roland@redhat.com>
authorRoland McGrath <roland@redhat.com>
Thu, 5 Jul 2007 20:03:16 +0000 (20:03 +0000)
committerRoland McGrath <roland@redhat.com>
Thu, 5 Jul 2007 20:03:16 +0000 (20:03 +0000)
* strace.c (strace_fopen): [_LFS64_LARGEFILE]: Use fopen64.
Fixes Debian#385310.

strace.c

index 6ee5b6a730f0a829e2d25524fdf88a9c138f8402..d6423ef24bc6d1d7db82b408efb9969cf5666da3 100644 (file)
--- 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();