NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bin/51849: [PATCH] tests/lib/libc/sys/t_clock_gettime: headers portability fixes
The following reply was made to PR bin/51849; it has been noted by GNATS.
From: "Ngie Cooper (yaneurabeya)" <yaneurabeya%gmail.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc:
Subject: Re: bin/51849: [PATCH] tests/lib/libc/sys/t_clock_gettime: headers
portability fixes
Date: Thu, 12 Jan 2017 22:05:29 -0800
--Apple-Mail=_674FABB8-1555-4CA7-87A5-998C7E10BF6D
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=us-ascii
Patch attached.
-Ngie
--Apple-Mail=_674FABB8-1555-4CA7-87A5-998C7E10BF6D
Content-Disposition: attachment;
filename=t_clock_gettime-use-portable-includes.patch
Content-Type: application/octet-stream;
x-unix-mode=0644;
name="t_clock_gettime-use-portable-includes.patch"
Content-Transfer-Encoding: 7bit
Index: lib/libc/sys/t_clock_gettime.c
===================================================================
RCS file: /cvsroot/src/tests/lib/libc/sys/t_clock_gettime.c,v
retrieving revision 1.1
diff -u -r1.1 t_clock_gettime.c
--- lib/libc/sys/t_clock_gettime.c 15 Oct 2011 06:42:16 -0000 1.1
+++ lib/libc/sys/t_clock_gettime.c 13 Jan 2017 05:52:13 -0000
@@ -63,17 +63,18 @@
#include <sys/param.h>
#include <sys/sysctl.h>
-#include <machine/int_limits.h>
#include <atf-c.h>
#include <errno.h>
+#include <limits.h>
#include <stdio.h>
+#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
-#include "../../../h_macros.h"
+#include "h_macros.h"
#define MINPOSDIFF 15000000 /* 15 ms for now */
#define TIMEOUT 5
Index: lib/libc/sys/Makefile
===================================================================
RCS file: /cvsroot/src/tests/lib/libc/sys/Makefile,v
retrieving revision 1.45
diff -u -r1.45 Makefile
--- lib/libc/sys/Makefile 11 Nov 2016 15:30:44 -0000 1.45
+++ lib/libc/sys/Makefile 13 Jan 2017 05:52:13 -0000
@@ -82,6 +82,7 @@
LDADD.t_posix_fadvise+= -lrumpvfs -lrump -lrumpuser -lrump -lpthread
.endif
+CPPFLAGS.t_clock_gettime.c+= -I${.CURDIR:H:H:H}
CPPFLAGS.t_lwp_create.c += -D_KERNTYPES
WARNS= 4
--Apple-Mail=_674FABB8-1555-4CA7-87A5-998C7E10BF6D--
Home |
Main Index |
Thread Index |
Old Index