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

unix: fix mkerrors.sh on OpenBSD by using strlcpy #163

Closed
wants to merge 1 commit into from

Commits on Jun 5, 2023

  1. unix: fix mkerrors.sh on OpenBSD by using strlcpy

    On OpenBSD, strcpy causes an error message output that recommends the
    use of strlcpy[0]. Here, the result was that this output became part of
    the generated program code, causing gofmt to fail and create an empty
    zerrors_openbsd_GOARCH.go file.
    
    An ifdef guard has been added within the C code which uses the desired
    strlcpy function under OpenBSD. Other operating systems continue to use
    strcpy.
    
    [0] https://github.com/openbsd/src/blob/958bc3ae91838214c6d3bb7efc272663a5df7b01/lib/libc/string/strcpy.c#L34-L37
    oxzi committed Jun 5, 2023
    Configuration menu
    Copy the full SHA
    8c0f635 View commit details
    Browse the repository at this point in the history