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 OpenBSD build #2458

Closed
wants to merge 2 commits into from
Closed

unix: fix OpenBSD build #2458

wants to merge 2 commits into from

Conversation

devnexen
Copy link
Contributor

@devnexen devnexen commented Sep 7, 2019

Mainly disabling source membership for udp feature, unsupported.

src/unix/fs.c Outdated Show resolved Hide resolved
src/unix/udp.c Outdated Show resolved Hide resolved
src/unix/fs.c Outdated
@@ -547,6 +547,8 @@ static int uv__fs_statfs(uv_fs_t* req) {

#if defined(__sun) || defined(__MVS__)
stat_fs->f_type = 0; /* f_type is not supported. */
#elif defined(__OpenBSD__)
stat_fs->f_type = (uint64_t)buf.f_fstypename;
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems incorrect. According to http://man.openbsd.org/4.4BSD-Lite2/statfs.2, there is a f_type field on OpenBSD. Furthermore, f_fstypename is a char array, and it's being assigned to a uint64_t here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure about the man page here it points to 4.4BSD-Lite 2 system but if I point to the actual OpenBSD 6.5
http://man.openbsd.org/OpenBSD-6.5/statfs.2

There is none I did on purpose so the developer can cast it back to string afterwards but I can disable the field for OpenBSD if you disagree no worries :)

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah you're right about that. Sorry.

In that case, I think we should just set it to zero (meaning __OpenBSD__ can just be part of the previous #if).

Mainly disabling source membership for udp feature, unsupported.
Copy link
Contributor

@cjihrig cjihrig left a comment

Choose a reason for hiding this comment

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

LGTM, assuming that you're running these changes locally 😄.

It would be nice to get these in the CI.

@blueyed
Copy link
Contributor

blueyed commented Sep 12, 2019

@cjihrig
FWIW, we're using https://sourcehut.org/ for Neovim, where we've noticed this with the OpenBSD build.

@devnexen
Copy link
Contributor Author

Ah yes I have few virtual or real BSD here and there ;-)

saghul pushed a commit that referenced this pull request Sep 25, 2019
Mainly disabling source membership for udp feature, unsupported.

PR-URL: #2458
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <s@saghul.net>
@saghul
Copy link
Member

saghul commented Sep 25, 2019

Landed in 59146f2, cheers!

@saghul saghul closed this Sep 25, 2019
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

4 participants