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 platform specific code for FreeBSD #13

Merged
merged 1 commit into from
Oct 12, 2022
Merged

Conversation

dveeden
Copy link
Contributor

@dveeden dveeden commented Sep 29, 2022

Fix build on FreeBSD

There is no syscall.Dup3 on FreeBSD. This leads to:

% go build
# github.com/ngaut/log
./crash_unix.go:16:11: undefined: syscall.Dup3

This is with FreeBSD 13. and Go 1.19.1

As the macOS code already uses Dup2 instead of Dup3 and the generic UNIX code doesn't set any flags it looks like it might be best to use Dup2 for all platforms.

@dveeden
Copy link
Contributor Author

dveeden commented Sep 29, 2022

I also filed this: golang/go#55935

@ngaut ngaut merged commit f3329cb into ngaut:master Oct 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants