#67774 closed defect (fixed)
libgit2-devel @1.7.0: builds fail for 10.8 thru 10.12: use of undeclared identifier 'errSSLNetworkTimeout'
Reported by: | mascguy (Christopher Nielsen) | Owned by: | mascguy (Christopher Nielsen) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.8.1 |
Keywords: | Cc: | ||
Port: | libgit2-devel |
Description (last modified by mascguy (Christopher Nielsen))
For version 1.7.0, upstream now references constant errSSLNetworkTimeout
in their SSL-related code. And that's only available in 10.13+. That change was made by commit:
https://github.com/libgit2/libgit2/commit/fad90428970e332153027773b517a1606c0efa1f
via PR 6535 - Introduce timeouts on sockets
Use of the constant is limited to source file src/libgit2/streams/stransport.c
.
While used in two places, one example of the change is as follows.
Previous logic:
if (ret < 0) { st->error = ret; return -36; /* ioErr */ }
New logic:
if (ret < 0) { st->error = ret; return (ret == GIT_TIMEOUT) ? errSSLNetworkTimeout : -36 /* ioErr */; }
Change History (7)
comment:1 Changed 16 months ago by mascguy (Christopher Nielsen)
Description: | modified (diff) |
---|
comment:2 Changed 16 months ago by mascguy (Christopher Nielsen)
Of note, upstream automatically disables use of SecurityFramework
for 10.7 and earlier, which is why builds succeed for those platforms. Presently the CMake files don't appear (?) to provide a formal option to do so, though it would be easy enough to patch one in.
Let's see what upstream wants to do though, before moving forward.
comment:3 Changed 16 months ago by mascguy (Christopher Nielsen)
Kudos to upstream, as they quickly responded to my PR comment. And at this point, the verdict is:
I think it would be disappointing to use OpenSSL on macOS when there's a perfectly good SSL library that gets software updates with the system. I realize that MacPorts and Homebrew likely will do software updates, but somebody compiling libgit2 from source on 10.11 likely won't.
I think that we can likely just hardcode the value (like we do for ioErr)
https://github.com/libgit2/libgit2/pull/6535#issuecomment-1643859900
comment:4 Changed 16 months ago by Christopher Nielsen <mascguy@…>
comment:5 follow-up: 7 Changed 16 months ago by mascguy (Christopher Nielsen)
Patch submitted to upstream, via: PR 6610 - stransport: macOS: replace errSSLNetworkTimeout, with hard-coded value
comment:6 Changed 16 months ago by mascguy (Christopher Nielsen)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:7 Changed 16 months ago by mascguy (Christopher Nielsen)
Replying to mascguy:
Patch submitted to upstream, via: PR 6610 - stransport: macOS: replace errSSLNetworkTimeout, with hard-coded value
Patch merged to master, via commit: Merge pull request #6610
Initial discussion with upstream initiated via PR comment:
https://github.com/libgit2/libgit2/pull/6535#issuecomment-1643782431
More to follow.