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

Backport patches to 0.4 #142

Merged
merged 8 commits into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/actions/install-rust/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ inputs:
default: 'stable'

runs:
using: node16
using: node20
main: 'main.js'
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
env:
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: |
rustup set profile minimal
rustup install ${{ matrix.rust }}
Expand All @@ -35,7 +35,7 @@ jobs:
# -D warnings is commented out in our install-rust action; re-add it here.
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
- uses: ./.github/actions/install-rust
Expand Down Expand Up @@ -70,7 +70,7 @@ jobs:
name: Update generated files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository -y 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy main'
Expand Down
6 changes: 5 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ static_assertions = "1.1.0"
libc = "0.2.100"

[package.metadata.docs.rs]
features = ["default", "bootparam", "ioctl", "netlink", "io_uring", "if_arp", "if_ether", "if_packet", "net", "prctl", "elf", "xdp", "mempolicy", "system", "loop_device"]
features = ["default", "bootparam", "btrfs", "elf_uapi", "ioctl", "landlock", "netlink", "io_uring", "if_arp", "if_ether", "if_packet", "net", "ptrace", "prctl", "elf", "xdp", "mempolicy", "system", "loop_device"]
targets = ["x86_64-unknown-linux-gnu", "i686-unknown-linux-gnu"]

[lints.rust.unexpected_cfgs]
Expand All @@ -33,18 +33,22 @@ check-cfg = [
# The rest of this file is auto-generated!
[features]
bootparam = []
btrfs = []
elf_uapi = []
errno = []
general = []
if_arp = []
if_ether = []
if_packet = []
io_uring = []
ioctl = []
landlock = []
loop_device = []
mempolicy = []
net = []
netlink = []
prctl = []
ptrace = []
system = []
xdp = []
default = ["std", "general", "errno"]
Expand Down
4 changes: 2 additions & 2 deletions gen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ edition = "2021"
publish = false

[dependencies]
bindgen = { version = "=0.66.1", default-features = false, features = ["which-rustfmt"] }
tempdir = "0.3.7"
bindgen = { version = "0.70.1", default-features = false }
tempfile = "3.12.0"
1 change: 1 addition & 0 deletions gen/include/stddef.h
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#define offsetof(t, d) __builtin_offsetof(t, d)
Empty file added gen/include/stdint.h
Empty file.
2 changes: 2 additions & 0 deletions gen/modules/btrfs.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#include <linux/btrfs.h>
#include <linux/btrfs_tree.h>
3 changes: 3 additions & 0 deletions gen/modules/elf_uapi.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#include "support.h"

#include <linux/elf.h>
1 change: 1 addition & 0 deletions gen/modules/landlock.h
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include <linux/landlock.h>
6 changes: 6 additions & 0 deletions gen/modules/ptrace.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include "support.h"

#include <linux/audit.h> /* Definition of AUDIT_* constants */
#include <linux/filter.h> /* Definition of struct sock_fprog */
#include <linux/ptrace.h> /* Definition of PTRACE_* constants */
#include <linux/seccomp.h> /* Definition of SECCOMP_* constants */
5 changes: 2 additions & 3 deletions gen/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ fn main() {

git_init();

let out = tempdir::TempDir::new("linux-raw-sys").unwrap();
let out = tempfile::TempDir::with_prefix("linux-raw-sys").unwrap();
let out_dir = out.path();
let linux_headers = out_dir.join("linux-headers");
let linux_include = linux_headers.join("include");
Expand Down Expand Up @@ -291,8 +291,7 @@ fn rust_arches(linux_arch: &str) -> &[&str] {
"x86" => &["x86", "x86_64", "x32"],
"alpha" | "cris" | "h8300" | "m68k" | "microblaze" | "mn10300" | "score" | "blackfin"
| "frv" | "ia64" | "m32r" | "m68knommu" | "parisc" | "sh" | "um" | "xtensa"
| "unicore32" | "c6x" | "nios2" | "openrisc" | "arc" | "nds32" | "metag"
| "tile" => &[],
| "unicore32" | "c6x" | "nios2" | "openrisc" | "arc" | "nds32" | "metag" | "tile" => &[],
_ => panic!("unrecognized arch: {}", linux_arch),
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/aarch64/bootparam.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/* automatically generated by rust-bindgen 0.66.1 */
/* automatically generated by rust-bindgen 0.70.1 */


Loading
Loading