Module Name:    src
Committed By:   christos
Date:           Fri Jan 13 20:06:50 UTC 2017

Modified Files:
        src/tests/lib/libc/sys: t_stat.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libc/sys/t_stat.c

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

Modified files:

Index: src/tests/lib/libc/sys/t_stat.c
diff -u src/tests/lib/libc/sys/t_stat.c:1.4 src/tests/lib/libc/sys/t_stat.c:1.5
--- src/tests/lib/libc/sys/t_stat.c:1.4	Sat Mar 17 04:37:08 2012
+++ src/tests/lib/libc/sys/t_stat.c	Fri Jan 13 15:06:50 2017
@@ -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 @@ ATF_TC_BODY(stat_symlink, tc)
 	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);
 }

Reply via email to