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

Link against pthread #139

Merged
merged 1 commit into from
Mar 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion init_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

package openssl

// #cgo LDFLAGS: -ldl
// #cgo LDFLAGS: -ldl -pthread
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a pedantic concern on hard-coding -pthread as some platforms seem to require -lpthread instead, though I guess it's out of scope of this module.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm aware of this unfortunate conflict, but it is also truth that the Go toolchain uses -pthread when building cgo and nobody complained AFAIK. Let's keep it like this, we can always fix it if a bug is reported.

// #include <stdlib.h>
// #include <dlfcn.h>
import "C"
Expand Down
Loading