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 PP/51845: Ngie Cooper: need <netinet/in.h...



details:   https://anonhg.NetBSD.org/src/rev/8418283b14d7
branches:  trunk
changeset: 820695:8418283b14d7
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Jan 13 20:06:50 2017 +0000

description:
PP/51845: Ngie Cooper: need <netinet/in.h> for htonl etc and fix  socket leak

diffstat:

 tests/lib/libc/sys/t_stat.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (33 lines):

diff -r 8052cae3f937 -r 8418283b14d7 tests/lib/libc/sys/t_stat.c
--- a/tests/lib/libc/sys/t_stat.c       Fri Jan 13 20:04:52 2017 +0000
+++ b/tests/lib/libc/sys/t_stat.c       Fri Jan 13 20:06:50 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_stat.c,v 1.4 2012/03/17 08:37:08 jruoho Exp $ */
+/* $NetBSD: t_stat.c,v 1.5 2017/01/13 20:06:50 christos Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,13 +29,14 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: t_stat.c,v 1.4 2012/03/17 08:37:08 jruoho Exp $");
+__RCSID("$NetBSD: t_stat.c,v 1.5 2017/01/13 20:06:50 christos Exp $");
 
 #include <sys/stat.h>
 #include <sys/socket.h>
 #include <sys/types.h>
 
 #include <arpa/inet.h>
+#include <netinet/in.h>
 
 #include <atf-c.h>
 #include <errno.h>
@@ -392,6 +393,7 @@
        if (sa.st_mode == sb.st_mode)
                atf_tc_fail("inconsistencies between stat(2) and lstat(2)");
 
+       (void)close(fd);
        ATF_REQUIRE(unlink(path) == 0);
        ATF_REQUIRE(unlink(pathlink) == 0);
 }



Home | Main Index | Thread Index | Old Index