X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=pax.c;h=5e2ec59084ce98c0322b818b83b1999de61c2418;hb=HEAD;hp=3c3d2b4719704c8b0f9917a55f419d828d60b08e;hpb=636335dbb356165e1d3e7cf91c416696d8b93910;p=debian%2Fpax diff --git a/pax.c b/pax.c index 3c3d2b4..5e2ec59 100644 --- a/pax.c +++ b/pax.c @@ -105,7 +105,7 @@ char *dirptr; /* destination dir in a copy */ char *ltmfrmt; /* -v locale time format (if any) */ char *argv0; /* root of argv[0] */ sigset_t s_mask; /* signal mask for cleanup critical sect */ -FILE *listf = stderr; /* file pointer to print file list to */ +FILE *listf; /* file pointer to print file list to */ char *tempfile; /* tempfile to use for mkstemp(3) */ char *tempbase; /* basename of tempfile to use for mkstemp(3) */ @@ -235,6 +235,12 @@ main(int argc, char **argv) char *tmpdir; size_t tdlen; + /* + * On some systems, stderr is not a constant, so we initialize listf + * immediately to emulate the behavior. + */ + listf=stderr; + /* * Keep a reference to cwd, so we can always come back home. */