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

Followup to #1649. #1985

Merged
merged 2 commits into from
Dec 3, 2020
Merged

Followup to #1649. #1985

merged 2 commits into from
Dec 3, 2020

Conversation

dvc94ch
Copy link
Contributor

@dvc94ch dvc94ch commented Dec 3, 2020

When adding nlmsghdr for musl targets the aarch64 arch was singled out, not getting the definition. This remedies the problem so that if-watch compiles on aarch64-unknown-linux-musl.

@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @JohnTitor (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@JohnTitor
Copy link
Member

IIUC these items are available across all the musl targets? If so, I now wonder we could place them in unix/linux_like/linux/musl/mod.rs.

@dvc94ch
Copy link
Contributor Author

dvc94ch commented Dec 3, 2020

I guess. But I don't even understand why libc doesn't use something like bindgen instead of manually curating structs. It seems like it would be more reliable and complete?

@JohnTitor
Copy link
Member

I guess. But I don't even understand why libc doesn't use something like bindgen instead of manually curating structs. It seems like it would be more reliable and complete?

See #423. Some are changed, e.g., cargo now has the build-std feature (unstable) but most are still valid and should be considered.

@dvc94ch
Copy link
Contributor Author

dvc94ch commented Dec 3, 2020

Seems to be that glibc reexports nlmsghdr from linux/netlink while musl does not. And in include/uapi/linux/netlink.h nlmsghdr is defined as:

struct nlmsghdr {
	__u32		nlmsg_len;	/* Length of message including header */
	__u16		nlmsg_type;	/* Message content */
	__u16		nlmsg_flags;	/* Additional flags */
	__u32		nlmsg_seq;	/* Sequence number */
	__u32		nlmsg_pid;	/* Sending process port ID */
};

meaning it should be identical on all archs.

I moved it to musl/mod.rs.

Copy link
Member

@JohnTitor JohnTitor left a comment

Choose a reason for hiding this comment

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

Thanks!

@JohnTitor
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Dec 3, 2020

📌 Commit 53a8be9 has been approved by JohnTitor

bors added a commit that referenced this pull request Dec 3, 2020
Followup to #1649.

When adding `nlmsghdr` for `musl` targets the `aarch64` arch was singled out, not getting the definition. This remedies the problem so that `if-watch` compiles on `aarch64-unknown-linux-musl`.

- [0] https://github.com/dvc94ch/if-watch/issues/3
@bors
Copy link
Contributor

bors commented Dec 3, 2020

⌛ Testing commit 53a8be9 with merge 570d6b0...

@bors
Copy link
Contributor

bors commented Dec 3, 2020

💔 Test failed - checks-actions

@JohnTitor
Copy link
Member

qemu-system-sparc64: terminating on signal 15 from pid 2145 (timeout)
OpenBIOS for Sparc64
Configuration device id QEMU version 1 machine id 0
kernel addr 404000 size b267e0
kernel cmdline init=/run_prog.sh
CPUs: 1 x SUNW,UltraSPARC-IIi
UUID: 00000000-0000-0000-0000-000000000000
Welcome to OpenBIOS v1.1 built on Mar 12 2020 14:03
  Type 'help' for detailed information

RUNNING ALL TESTS[   12.031764] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000000
error: test failed, to rerun pass '--test linux-strerror_r'

Spurious, @bors retry

@bors
Copy link
Contributor

bors commented Dec 3, 2020

⌛ Testing commit 53a8be9 with merge 96e6147...

@bors
Copy link
Contributor

bors commented Dec 3, 2020

☀️ Test successful - checks-actions, checks-cirrus-freebsd-11, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13
Approved by: JohnTitor
Pushing 96e6147 to master...

@bors bors merged commit 96e6147 into rust-lang:master Dec 3, 2020
@dvc94ch
Copy link
Contributor Author

dvc94ch commented Dec 6, 2020

Looks like there aren't any open PR's and that there have been quite a few commits since the last release. Is it maybe possible to make a new release?

@JohnTitor
Copy link
Member

As mentioned in the contributing guide (https://github.com/rust-lang/libc/blob/master/CONTRIBUTING.md#releasing-your-change-to-cratesio), you can send a PR to make a release anytime! This time I opened #1988.

@dvc94ch
Copy link
Contributor Author

dvc94ch commented Dec 6, 2020

Thanks, hadn't seen that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants