Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/lib/libc/sys Include <inttypes.h> in t_ucontext.c



details:   https://anonhg.NetBSD.org/src/rev/9f1e1c0ef505
branches:  trunk
changeset: 830164:9f1e1c0ef505
user:      kamil <kamil%NetBSD.org@localhost>
date:      Tue Feb 27 12:20:35 2018 +0000

description:
Include <inttypes.h> in t_ucontext.c

The <inttypes.h> user-land header is required for PRI types.
We were including indirectly <sys/inttypes.h> through <sys/*.h> sources,
and this worked for most of the ports.

This fixes indirectly a build for MIPS (tested ports: arc and hpcmips),
where PRI types (PRIxREGISTER) were undefined.

Noted by <uwe>.

diffstat:

 tests/lib/libc/sys/t_ucontext.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (23 lines):

diff -r 3f4a09dcafd1 -r 9f1e1c0ef505 tests/lib/libc/sys/t_ucontext.c
--- a/tests/lib/libc/sys/t_ucontext.c   Tue Feb 27 11:50:57 2018 +0000
+++ b/tests/lib/libc/sys/t_ucontext.c   Tue Feb 27 12:20:35 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_ucontext.c,v 1.4 2018/02/27 11:15:53 kamil Exp $ */
+/* $NetBSD: t_ucontext.c,v 1.5 2018/02/27 12:20:35 kamil Exp $ */
 
 /*
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -29,11 +29,12 @@
 #include <sys/cdefs.h>
 __COPYRIGHT("@(#) Copyright (c) 2008\
  The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_ucontext.c,v 1.4 2018/02/27 11:15:53 kamil Exp $");
+__RCSID("$NetBSD: t_ucontext.c,v 1.5 2018/02/27 12:20:35 kamil Exp $");
 
 #include <atf-c.h>
 #include <stdio.h>
 #include <ucontext.h>
+#include <inttypes.h>
 
 ATF_TC(ucontext_basic);
 ATF_TC_HEAD(ucontext_basic, tc)



Home | Main Index | Thread Index | Old Index