From: rsbecker@nexbridge.com Date: Fri, 29 Oct 2021 21:10:44 GMT Subject: RE: [Bug] wrapper.c uses unportable unsetenv Message-ID: <013a01d7cd09$72d91cb0$588b5610$@nexbridge.com> In-Reply-To: <013501d7cd06$8c8281e0$a58785a0$@nexbridge.com> On October 29, 2021 4:50 PM, I wrote: > To: 'Junio C Hamano' > Cc: git@vger.kernel.org > Subject: RE: [Bug] wrapper.c uses unportable unsetenv > > On October 29, 2021 4:35 PM, Junio C Hamano: > > writes: > > > > There are compat/setenv.c and compat/unsetenv.c to be used when > > NO_SETENV and NO_UNSETENV are defined. Is that how you built your Git > > earlier since 2007, perhaps? > > We have defined NO_SETENV and NO_UNSETENV since I have been maintaining > it, so I don't get how we are getting into this situation. I was planning on > removing NO_SETENV when the OS caught up for that on our minimum support > builds next year. NO_UNSETENV needs to stick around for bit longer. The > setenv() code is actually fine. It is unsetenv() that is causing problems. > Should not git-compat-util.h be included in wrapper.c so that we reference > gitunsetenv? The actual issue is this: if (!unsetenv(name)) ^ "/home/ituglib/randall/git/wrapper.c", line 156: error(134): expression must have arithmetic or pointer type This is with NO_UNSETENV = YesPlease. It makes no sense to me why this isn't compiling.