Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix golang 1.11 compatibility on Windows #285

Closed
wants to merge 1 commit into from

Conversation

kolyshkin
Copy link

Go 1.11beta1 introduces an incompatible change to the type of
CertChainPolicyPara.ExtraPolicyPara field [1], which results
in the following compile error on Windows:

x509\root_windows.go:112:3: cannot use
uintptr(unsafe.Pointer(sslPara)) (type uintptr) as type
syscall.Pointer in field value

The fix, maintaining backward compatibility with Go 1.10 and 1.9,
is to use type alias. Unfortunately it won't work with go < 1.9
as those earlier versions lack the type alias feature.

This should fix issue #284.

[1] golang/go@4869ec00e87ef

Go 1.11beta1 introduces an incompatible change to the type of
CertChainPolicyPara.ExtraPolicyPara field [1], which results
in the following compile error on Windows:

> x509\root_windows.go:112:3: cannot use
> uintptr(unsafe.Pointer(sslPara)) (type uintptr) as type
> syscall.Pointer in field value

The fix, maintaining backward compatibility with Go 1.10 and 1.9,
is to use type alias. Unfortunately it won't work with go < 1.9
as those earlier versions lack the type alias feature.

This should fix issue google#284.

[1] golang/go@4869ec00e87ef

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@codecov
Copy link

codecov bot commented Jul 4, 2018

Codecov Report

Merging #285 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #285   +/-   ##
=======================================
  Coverage   69.98%   69.98%           
=======================================
  Files          68       68           
  Lines        8769     8769           
=======================================
  Hits         6137     6137           
  Misses       2086     2086           
  Partials      546      546

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3b560b3...f74f9e4. Read the comment docs.

@kolyshkin
Copy link
Author

Alternative to this one: #286

@daviddrysdale
Copy link
Contributor

Went for the #286 approach, let us know if we need to revisit.

@kolyshkin kolyshkin deleted the go111 branch August 14, 2018 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants