$NetBSD: patch-ad,v 1.2 2003/12/05 05:40:32 ben Exp $ --- src/utils.c.orig 1994-07-25 09:23:16.000000000 -0700 +++ src/utils.c @@ -697,8 +697,13 @@ direntry_print (name, statbuf, mode) print_perm((uint32)statbuf.st_mode); +#if (defined(BSD) && BSD >= 199306) + (void) printf(" %-9.9s %7lld %s", owner, statbuf.st_size, + a_time + 4); +#else (void) printf(" %-9.9s %7d %s", owner, statbuf.st_size, a_time + 4); +#endif printf(" %s\n", name); } @@ -789,13 +794,10 @@ fd_tempfilename_generate() int fd; (void) strcpy(tmp, TEMPFILE_TEMPLATE); - if ((char *) mktemp(tmp) == NULL) { - perror("tempfilename_generate: mktemp()"); - exit(1); - } + fd = mkstemp(tmp); - if ((fd = open(tmp, O_RDWR | O_CREAT, 0600)) < 0) { - perror("tempfilename_generate: open()"); + if (fd == -1) { + perror("tempfilename_generate: mkstemp()"); exit(1); } /* unlink right away to make sure no one can tamper with our file */