Message ID | 6bf94982-71c4-78e9-0f4d-7fa4e485c417@blastwave.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | minor patch required to compile git 2.26.1 on Oracle Solaris 10 with Oracle Studio | expand |
Dennis Clarke <dclarke@blastwave.org> writes: > Very minor patch required : But both size_t and unsigned int are wrong types, no? Shouldn't we be using socklen_t (and we seem to have autoconf support to figure out an appropriate socklen_t fallback typedef)? > --- ./compat/inet_ntop.c.orig Tue Apr 14 01:51:03 2020 > +++ ./compat/inet_ntop.c Sun Apr 19 04:16:39 2020 > @@ -168,7 +168,7 @@ > * Paul Vixie, 1996. > */ > const char * > -inet_ntop(int af, const void *src, char *dst, size_t size) > +inet_ntop(int af, const void *src, char *dst, unsigned int size) > { > switch (af) { > case AF_INET: > --- ./git-compat-util.h.orig Tue Apr 14 01:51:03 2020 > +++ ./git-compat-util.h Sun Apr 19 03:56:17 2020 > @@ -795,7 +795,7 @@ > #endif > > #ifdef NO_INET_NTOP > -const char *inet_ntop(int af, const void *src, char *dst, size_t size); > +const char *inet_ntop(int af, const void *src, char *dst, unsigned > int size); > #endif > > #ifdef NO_PTHREADS > # > # exit > > That allows compile to proceed beatly with : > > alpha$ > alpha$ cc -V > cc: Studio 12.6 Sun C 5.15 SunOS_sparc 2017/05/30
On Sat, Apr 18, 2020 at 10:35:45PM -0700, Junio C Hamano wrote: > Dennis Clarke <dclarke@blastwave.org> writes: > > > Very minor patch required : > > But both size_t and unsigned int are wrong types, no? Shouldn't we > be using socklen_t (and we seem to have autoconf support to figure > out an appropriate socklen_t fallback typedef)? That is generally the right type according to POSIX, but I think there's something even more subtle going on. If we're defining our own inet_ntop(), then the type shouldn't really matter, should it? Dennis didn't show us the compiler errors, but my suspicion is that it is complaining because it is seeing the definition of inet_ntop() already from a system header, and ours does not match. Which implies that NO_INET_NTOP should not be set in the first place. I think this is the same issue discussed in: https://lore.kernel.org/git/CAH8yC8m3JFvEcfFF3z1rrRnEPK-adHGObmkOhNZiph7QJKUWqA@mail.gmail.com/ with a patch (which needs at least a signoff added) in: https://lore.kernel.org/git/CAH8yC8kaWXbN+RYMJnM9em7KKW54+N07JtyS1MZk0qppD=m2BA@mail.gmail.com/ Dennis, does building with: make NO_INET_NTOP= NO_INET_PTON= help? -Peff
On Wed, Apr 22, 2020 at 04:09:50AM -0400, Jeff King wrote: > Which implies that NO_INET_NTOP should not be set in the first place. > I think this is the same issue discussed in: > > https://lore.kernel.org/git/CAH8yC8m3JFvEcfFF3z1rrRnEPK-adHGObmkOhNZiph7QJKUWqA@mail.gmail.com/ > > with a patch (which needs at least a signoff added) in: > > https://lore.kernel.org/git/CAH8yC8kaWXbN+RYMJnM9em7KKW54+N07JtyS1MZk0qppD=m2BA@mail.gmail.com/ > > Dennis, does building with: > > make NO_INET_NTOP= NO_INET_PTON= > > help? Sorry, I meant to cc Jeffrey Walton from that thread but forgot to. Doing so now. -Peff
On 2020-04-22 04:11, Jeff King wrote: > On Wed, Apr 22, 2020 at 04:09:50AM -0400, Jeff King wrote: > >> Which implies that NO_INET_NTOP should not be set in the first place. >> I think this is the same issue discussed in: >> >> https://lore.kernel.org/git/CAH8yC8m3JFvEcfFF3z1rrRnEPK-adHGObmkOhNZiph7QJKUWqA@mail.gmail.com/ >> >> with a patch (which needs at least a signoff added) in: >> >> https://lore.kernel.org/git/CAH8yC8kaWXbN+RYMJnM9em7KKW54+N07JtyS1MZk0qppD=m2BA@mail.gmail.com/ >> >> Dennis, does building with: >> >> make NO_INET_NTOP= NO_INET_PTON= >> I will give that a try today and see what happens. There seems to be a 2.26.2 release from yesterday and may as well get that going. What was the changelog reason for the bump from 2.26.1 to 2.26.2 ? Dennis
On Wed, Apr 22, 2020 at 08:09:46PM -0400, Dennis Clarke wrote: > On 2020-04-22 04:11, Jeff King wrote: > > On Wed, Apr 22, 2020 at 04:09:50AM -0400, Jeff King wrote: > > > > > Which implies that NO_INET_NTOP should not be set in the first place. > > > I think this is the same issue discussed in: > > > > > > https://lore.kernel.org/git/CAH8yC8m3JFvEcfFF3z1rrRnEPK-adHGObmkOhNZiph7QJKUWqA@mail.gmail.com/ > > > > > > with a patch (which needs at least a signoff added) in: > > > > > > https://lore.kernel.org/git/CAH8yC8kaWXbN+RYMJnM9em7KKW54+N07JtyS1MZk0qppD=m2BA@mail.gmail.com/ > > > > > > Dennis, does building with: > > > > > > make NO_INET_NTOP= NO_INET_PTON= > > > > > I will give that a try today and see what happens. There seems to be a > 2.26.2 release from yesterday and may as well get that going. What was the > changelog reason for the bump from 2.26.1 to 2.26.2 ? > > Dennis > > Hello Dennis, There was another CVE disclosed: https://lore.kernel.org/git/xmqq4kterq5s.fsf@gitster.c.googlers.com/ Kind regards, Kevin
--- ./compat/inet_ntop.c.orig Tue Apr 14 01:51:03 2020 +++ ./compat/inet_ntop.c Sun Apr 19 04:16:39 2020 @@ -168,7 +168,7 @@ * Paul Vixie, 1996. */ const char * -inet_ntop(int af, const void *src, char *dst, size_t size) +inet_ntop(int af, const void *src, char *dst, unsigned int size) { switch (af) { case AF_INET: --- ./git-compat-util.h.orig Tue Apr 14 01:51:03 2020 +++ ./git-compat-util.h Sun Apr 19 03:56:17 2020 @@ -795,7 +795,7 @@ #endif #ifdef NO_INET_NTOP -const char *inet_ntop(int af, const void *src, char *dst, size_t size); +const char *inet_ntop(int af, const void *src, char *dst, unsigned int size); #endif