NetBSD-Bugs archive

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

Re: bin/51845: [PATCH] tests/lib/libc/sys/t_stat: fix #include portability issue and socket leak



The following reply was made to PR bin/51845; it has been noted by GNATS.

From: "Ngie Cooper (yaneurabeya)" <yaneurabeya%gmail.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: bin/51845: [PATCH] tests/lib/libc/sys/t_stat: fix #include
 portability issue and socket leak
Date: Thu, 12 Jan 2017 21:26:15 -0800

 --Apple-Mail=_0974EF2F-BA56-4EF2-83F0-FB75326FFDC9
 Content-Transfer-Encoding: 7bit
 Content-Type: text/plain;
 	charset=us-ascii
 
 Patch attached.
 -Ngie
 
 --Apple-Mail=_0974EF2F-BA56-4EF2-83F0-FB75326FFDC9
 Content-Disposition: attachment;
 	filename=t_stat-portability-and-leak-fixes.patch
 Content-Type: application/octet-stream;
 	x-unix-mode=0644;
 	name="t_stat-portability-and-leak-fixes.patch"
 Content-Transfer-Encoding: 7bit
 
 Index: lib/libc/sys/t_stat.c
 ===================================================================
 RCS file: /cvsroot/src/tests/lib/libc/sys/t_stat.c,v
 retrieving revision 1.4
 diff -u -r1.4 t_stat.c
 --- lib/libc/sys/t_stat.c	17 Mar 2012 08:37:08 -0000	1.4
 +++ lib/libc/sys/t_stat.c	13 Jan 2017 05:16:49 -0000
 @@ -36,6 +36,7 @@
  #include <sys/types.h>
  
  #include <arpa/inet.h>
 +#include <netinet/in.h>
  
  #include <atf-c.h>
  #include <errno.h>
 @@ -394,6 +395,7 @@
  
  	ATF_REQUIRE(unlink(path) == 0);
  	ATF_REQUIRE(unlink(pathlink) == 0);
 +	(void)close(fd);
  }
  
  ATF_TC_CLEANUP(stat_symlink, tc)
 
 --Apple-Mail=_0974EF2F-BA56-4EF2-83F0-FB75326FFDC9--
 


Home | Main Index | Thread Index | Old Index