NetBSD Problem Report #51811

From www@NetBSD.org  Tue Jan 10 09:40:35 2017
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id B7CD07A289
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 10 Jan 2017 09:40:35 +0000 (UTC)
Message-Id: <20170110094034.C243E7A2B2@mollari.NetBSD.org>
Date: Tue, 10 Jan 2017 09:40:34 +0000 (UTC)
From: yaneurabeya@gmail.com
Reply-To: yaneurabeya@gmail.com
To: gnats-bugs@NetBSD.org
Subject: [PATCH] tests/lib/libc/gen/t_sleep: add missing #includes
X-Send-Pr-Version: www-1.0

>Number:         51811
>Category:       bin
>Synopsis:       [PATCH] tests/lib/libc/gen/t_sleep: add missing #includes
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 10 09:45:00 +0000 2017
>Closed-Date:    Tue Jan 10 18:20:32 +0000 2017
>Last-Modified:  Tue Jan 10 18:20:32 +0000 2017
>Originator:     Ngie Cooper
>Release:        7.0.2
>Organization:
>Environment:
n/a
>Description:
Add missing #includes for kevent(2), etc. This works on NetBSD via header pollution, but doesn't on FreeBSD for instance.
>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:
From: "Ngie Cooper (yaneurabeya)" <yaneurabeya@gmail.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: bin/51811: [PATCH] tests/lib/libc/gen/t_sleep: add missing
 #includes
Date: Tue, 10 Jan 2017 01:47:48 -0800

 --Apple-Mail=_30A0526E-E776-4AA3-ACFB-B2C63A52985E
 Content-Transfer-Encoding: 7bit
 Content-Type: text/plain;
 	charset=us-ascii

 Patch attached.

 --Apple-Mail=_30A0526E-E776-4AA3-ACFB-B2C63A52985E
 Content-Disposition: attachment;
 	filename=t_sleep-add-missing-includes.patch
 Content-Type: application/octet-stream;
 	x-unix-mode=0644;
 	name="t_sleep-add-missing-includes.patch"
 Content-Transfer-Encoding: 7bit

 Index: t_sleep.c
 ===================================================================
 RCS file: /cvsroot/src/tests/lib/libc/gen/t_sleep.c,v
 retrieving revision 1.9
 diff -u -r1.9 t_sleep.c
 --- t_sleep.c	11 Aug 2016 21:34:11 -0000	1.9
 +++ t_sleep.c	10 Jan 2017 09:38:52 -0000
 @@ -26,8 +26,10 @@
   * POSSIBILITY OF SUCH DAMAGE.
   */

 +#include <sys/time.h>
  #include <atf-c.h>
  #include <errno.h>
 +#include <inttypes.h>
  #include <poll.h>
  #include <stdio.h>
  #include <stdlib.h>

 --Apple-Mail=_30A0526E-E776-4AA3-ACFB-B2C63A52985E--

From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, 
	yaneurabeya@gmail.com
Cc: 
Subject: Re: bin/51811: [PATCH] tests/lib/libc/gen/t_sleep: add missing #includes
Date: Tue, 10 Jan 2017 10:29:30 -0500

 On Jan 10,  9:50am, yaneurabeya@gmail.com ("Ngie Cooper (yaneurabeya)") wrote:
 -- Subject: Re: bin/51811: [PATCH] tests/lib/libc/gen/t_sleep: add missing #i

 |  +#include <sys/time.h>

 This includes <time.h>, so <sys/time.h> should not be needed. According
 to http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/time.h.html
 this should include struct timespec etc, so I guess thisis missing
 TIMESPEC_TO_TIMEVAL which is included in <sys/timespec.h>...

 christos

From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/51811 CVS commit: src/tests/lib/libc/gen
Date: Tue, 10 Jan 2017 10:31:11 -0500

 Module Name:	src
 Committed By:	christos
 Date:		Tue Jan 10 15:31:11 UTC 2017

 Modified Files:
 	src/tests/lib/libc/gen: t_sleep.c

 Log Message:
 PR/51811: Ngie Cooper: Fix include file portability.


 To generate a diff of this commit:
 cvs rdiff -u -r1.9 -r1.10 src/tests/lib/libc/gen/t_sleep.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: PR/51811 CVS commit: src/tests/lib/libc/gen
Date: Tue, 10 Jan 2017 18:18:45 +0000

 On Tue, Jan 10, 2017 at 03:35:00PM +0000, Christos Zoulas wrote:
  >  Log Message:
  >  PR/51811: Ngie Cooper: Fix include file portability.

 What? Surely you know that you can't include <sys/time.h> and <time.h>
 together on obsolete buggix from the 80s... autoconf still routinely
 checks for it and everything!

 :-)

 -- 
 David A. Holland
 dholland@netbsd.org

State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Tue, 10 Jan 2017 18:20:32 +0000
State-Changed-Why:
christos committed it, thanks


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.