Skip to content

Commit

Permalink
Auto merge of #3212 - sunfishcode:sunfishcode/ficlone-mips-power, r=J…
Browse files Browse the repository at this point in the history
…ohnTitor

Define `FICLONE` on mips and power.

PR #3173 added definitions of `FICLONE` for mips and power to a generic file, however mips and power have their own versions of this file, so move their `FICLONE` definitions into their own files.
  • Loading branch information
bors committed Apr 22, 2023
2 parents 2de3ab9 + 032a055 commit c2f0f71
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/unix/linux_like/linux/arch/generic/mod.rs
Expand Up @@ -104,6 +104,8 @@ cfg_if! {
pub const SO_DETACH_REUSEPORT_BPF: ::c_int = 68;
}
}
// pub const SO_PREFER_BUSY_POLL: ::c_int = 69;
// pub const SO_BUSY_POLL_BUDGET: ::c_int = 70;

cfg_if! {
if #[cfg(any(target_arch = "x86",
Expand All @@ -114,16 +116,8 @@ cfg_if! {
target_arch = "s390x"))] {
pub const FICLONE: ::c_ulong = 0x40049409;
pub const FICLONERANGE: ::c_ulong = 0x4020940D;
} else if #[cfg(any(target_arch = "mips",
target_arch = "mips64",
target_arch = "powerpc",
target_arch = "powerpc64"))] {
pub const FICLONE: ::c_ulong = 0x80049409;
pub const FICLONERANGE: ::c_ulong = 0x8020940D;
}
}
// pub const SO_PREFER_BUSY_POLL: ::c_int = 69;
// pub const SO_BUSY_POLL_BUDGET: ::c_int = 70;

// Defined in unix/linux_like/mod.rs
// pub const SCM_TIMESTAMP: ::c_int = SO_TIMESTAMP;
Expand Down
3 changes: 3 additions & 0 deletions src/unix/linux_like/linux/arch/mips/mod.rs
Expand Up @@ -103,6 +103,9 @@ pub const SO_TIMESTAMPING: ::c_int = 37;
// pub const SO_PREFER_BUSY_POLL: ::c_int = 69;
// pub const SO_BUSY_POLL_BUDGET: ::c_int = 70;

pub const FICLONE: ::c_ulong = 0x80049409;
pub const FICLONERANGE: ::c_ulong = 0x8020940D;

// Defined in unix/linux_like/mod.rs
// pub const SCM_TIMESTAMP: ::c_int = SO_TIMESTAMP;
pub const SCM_TIMESTAMPNS: ::c_int = SO_TIMESTAMPNS;
Expand Down
3 changes: 3 additions & 0 deletions src/unix/linux_like/linux/arch/powerpc/mod.rs
Expand Up @@ -85,6 +85,9 @@ pub const SO_BINDTOIFINDEX: ::c_int = 62;
// pub const SO_PREFER_BUSY_POLL: ::c_int = 69;
// pub const SO_BUSY_POLL_BUDGET: ::c_int = 70;

pub const FICLONE: ::c_ulong = 0x80049409;
pub const FICLONERANGE: ::c_ulong = 0x8020940D;

// Defined in unix/linux_like/mod.rs
// pub const SCM_TIMESTAMP: ::c_int = SO_TIMESTAMP;
pub const SCM_TIMESTAMPNS: ::c_int = SO_TIMESTAMPNS;
Expand Down

0 comments on commit c2f0f71

Please sign in to comment.