From: Stuart Henderson Subject: Re: Confused about a swig patch. To: Stuart Cassoff Cc: OpenBSD Ports Date: Wed, 17 Dec 2025 12:47:14 +0000 this is what typically happens if you don't notice that a patch was committed upstream. ok to drop the patch + bump REVISION. On 2025/12/17 07:26, Stuart Cassoff wrote: > patch-Source_Swig_include_c > > "Fix filedescriptor leak." > > > Initially: > > $OpenBSD: patch-Source_Swig_include_c,v 1.1 2017/04/10 11:30:51 kettenis Exp $ > --- Source/Swig/include.c.orig Sun Sep 15 16:11:43 2013 > +++ Source/Swig/include.c Sun Apr 9 23:01:00 2017 > @@ -291,6 +291,7 @@ int Swig_insert_file(const_String_or_char_ptr filename > while ((nbytes = Read(f, buffer, 4096)) > 0) { > Write(outfile, buffer, nbytes); > } > + fclose(f); > return 0; > } > > > > Next version: > > $OpenBSD: patch-Source_Swig_include_c,v 1.2 2017/11/01 16:41:21 rsadowski Exp $ > Index: Source/Swig/include.c > --- Source/Swig/include.c.orig > +++ Source/Swig/include.c > @@ -291,7 +291,6 @@ > int Swig_insert_file(const_String_or_char_ptr filename > while ((nbytes = Read(f, buffer, 4096)) > 0) { > Write(outfile, buffer, nbytes); > } > - fclose(f); > return 0; > } > > > > Fixed on 2016/06/16: > https://github.com/swig/swig/commit/030a3b08bf981397ea5a16e0d3f727d7b4beba54 > "Fix leaked file descriptor" > > > So is this being re-broken? Seems like the patch should be dropped. > > > Stu >