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

OpenBSD: add sendmmsg and recvmmsg support. #3831

Merged
merged 1 commit into from
Aug 16, 2024
Merged

Conversation

devnexen
Copy link
Contributor

close #3696

@rustbot
Copy link
Collaborator

rustbot commented Aug 15, 2024

r? @JohnTitor

rustbot has assigned @JohnTitor.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot
Copy link
Collaborator

rustbot commented Aug 15, 2024

Some changes occurred in OpenBSD module

cc @semarie

Copy link
Contributor

@semarie semarie left a comment

Choose a reason for hiding this comment

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

it doesn't pass the test suite under OpenBSD.

  cargo:warning=/data/semarie/repos/rust/build-libc/build/x86_64-unknown-openbsd/debug/build/libc-test-29cac031f36c8215/out/main.c:15544:51: error: must use 'struct' tag to refer to type 'mmsghdr'
  cargo:warning=             int (*__test_fn_sendmmsg(void))(int, mmsghdr*, unsigned int, int) {
  cargo:warning=                                                  ^
  cargo:warning=                                                  struct
  cargo:warning=/data/semarie/repos/rust/build-libc/build/x86_64-unknown-openbsd/debug/build/libc-test-29cac031f36c8215/out/main.c:15549:51: error: must use 'struct' tag to refer to type 'mmsghdr'
  cargo:warning=             int (*__test_fn_recvmmsg(void))(int, mmsghdr*, unsigned int, int, struct timespec*) {
  cargo:warning=                                                  ^
  cargo:warning=                                                  struct
  cargo:warning=2 errors generated.

  --- stderr
  rust version: 1.80.0


  error occurred: Command "/usr/local/bin/sccache" "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-2" "-fno-omit-frame-pointer" "-m64" "--target=x86_64-unknown-openbsd" "-Wall" "-Wextra" "-Wall" "-Wextra" "-Werror" "-Wno-unused-parameter" "-Wno-type-limits" "-Wno-address-of-packed-member" "-Wno-unknown-warning-option" "-Wno-deprecated-declarations" "-Wno-deprecated-declarations" "-o" "/data/semarie/repos/rust/build-libc/build/x86_64-unknown-openbsd/debug/build/libc-test-29cac031f36c8215/out/08e68c28a9818392-main.o" "-c" "/data/semarie/repos/rust/build-libc/build/x86_64-unknown-openbsd/debug/build/libc-test-29cac031f36c8215/out/main.c" with args cc did not execute successfully (status code exit status: 1).

Copy link
Contributor

@semarie semarie left a comment

Choose a reason for hiding this comment

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

LGTM now (but getnameinfo break the build)

@tgross35
Copy link
Contributor

This is follow up of #3703

@@ -1210,6 +1210,7 @@ readlinkat
reallocarray
reboot
recvmsg
recvmmsg
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add sendmmsg and mmsghdr?

@tgross35
Copy link
Contributor

OpenBSD and NetBSD actually seem to have a slightly different signature for sendmmsg: on OpenBSD the mmsg pointer is const, but not for NetBSD. I assume NetBSD could also be const even though this isn't in the API.

This doesn't seem worth special casing on, leaving it mut does work for both. So LGTM, thanks!

@tgross35 tgross35 added the stable-nominated This PR should be considered for cherry-pick to libc's stable release branch label Aug 16, 2024
@tgross35 tgross35 added this pull request to the merge queue Aug 16, 2024
Merged via the queue into rust-lang:main with commit 509d9b3 Aug 16, 2024
39 checks passed
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Aug 29, 2024
@tgross35 tgross35 added stable-applied This PR has been cherry-picked to libc's stable release branch and removed stable-nominated This PR should be considered for cherry-pick to libc's stable release branch labels Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author stable-applied This PR has been cherry-picked to libc's stable release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add recvmmsg and sendmmsg on OpenBSD (*-unknown-openbsd)
5 participants