From owner-freebsd-bugs Tue Sep 17 16:30:04 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id QAA21313 for bugs-outgoing; Tue, 17 Sep 1996 16:30:04 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id QAA21306; Tue, 17 Sep 1996 16:30:02 -0700 (PDT) Resent-Date: Tue, 17 Sep 1996 16:30:02 -0700 (PDT) Resent-Message-Id: <199609172330.QAA21306@freefall.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, jdrobina@infinet.com Received: from drobina.my.domain (cmh-p100.infinet.com [206.103.242.106]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id QAA21243 for ; Tue, 17 Sep 1996 16:28:56 -0700 (PDT) Received: (from jdrobina@localhost) by infinet.com (8.7.5/8.6.12) id TAA29844; Tue, 17 Sep 1996 19:27:51 -0400 (EDT) Message-Id: <199609172327.TAA29844@infinet.com> Date: Tue, 17 Sep 1996 19:27:51 -0400 (EDT) From: James Drobina Reply-To: jdrobina@infinet.com To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: kern/1632: Field names in struct timespec are incorrect Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >Number: 1632 >Category: kern >Synopsis: Field names in struct timespec are incorrect >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Sep 17 16:30:01 PDT 1996 >Last-Modified: >Originator: James Drobina >Organization: None >Release: FreeBSD 2.2-CURRENT i386 >Environment: 2.2-CURRENT >Description: In sys/time.h, struct timespec is defined as: /* * Structure defined by POSIX.4 to be like a timeval. */ struct timespec { time_t ts_sec; /* seconds */ long ts_nsec; /* and nanoseconds */ }; The correct names of the fields are tv_sec and tv_nsec. (There was traffic about this problem on freebsd-bugs, but no bug report.) >How-To-Repeat: N/A >Fix: Define the structure as: /* * Structure defined by POSIX.4 to be like a timeval. */ struct timespec { time_t tv_sec; /* seconds */ long tv_nsec; /* and nanoseconds */ }; Don't forget the TIMEVAL_TO_TIMESPEC and TIMESPEC_TO_TIMEVAL macros. >Audit-Trail: >Unformatted: