From owner-freebsd-bugs Mon Jan 10 6:26: 3 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from vtopus.cs.vt.edu (vtopus.cs.vt.edu [128.173.40.24]) by hub.freebsd.org (Postfix) with ESMTP id 5F2351524D for ; Mon, 10 Jan 2000 06:26:00 -0800 (PST) (envelope-from dhagan@cs.vt.edu) Received: from localhost (dhagan@localhost) by vtopus.cs.vt.edu (8.9.1a/8.9.1) with SMTP id JAA01191; Mon, 10 Jan 2000 09:25:56 -0500 (EST) Date: Mon, 10 Jan 2000 09:25:56 -0500 (EST) From: Daniel Hagan To: bugs@freebsd.org Cc: j@uriah.heep.sax.de, schweikh@noc.dfn.de Subject: bin/4238 - chpass time delay sensitivity [PATCH] Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org J"org wrote a long time ago: > Fix: include st_mtimensec into the consideration. st_mtimensec is only available if _POSIX_SOURCE is defined. However, defining this in the Makefile breaks lots of other things. The stat struct includes st_mtimespec.tv_nsec, which should be equivalent (I think). Here's a patch that uses this field. Are there any reasons to avoid using this? (is this a non-standard field that might disappear?) Index: edit.c =================================================================== RCS file: /src/cvs/src/usr.bin/chpass/edit.c,v retrieving revision 1.16 diff -r1.16 edit.c 75c75,76 < if (begin.st_mtime == end.st_mtime) { --- > if ((begin.st_mtimespec.tv_nsec == end.st_mtimespec.tv_nsec) && > (begin.st_size == end.st_size)) { [uuencoded version to preserve whitespace] begin 600 pr4238.patch M26YD97@Z(&5D:70N8PH]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T] M/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]"E)#4R!F:6QE M.B`OPHM M+2T*/B`)"6EF("@H8F5G:6XNPHF ` end -- Daniel Hagan Computer Science CSE dhagan@cs.vt.edu http://www.cs.vt.edu/~dhagan/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message