Skip to content

Commit c2f0f71

Browse files
committed
Auto merge of #3212 - sunfishcode:sunfishcode/ficlone-mips-power, r=JohnTitor
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.
2 parents 2de3ab9 + 032a055 commit c2f0f71

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/unix/linux_like/linux/arch/generic/mod.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ cfg_if! {
104104
pub const SO_DETACH_REUSEPORT_BPF: ::c_int = 68;
105105
}
106106
}
107+
// pub const SO_PREFER_BUSY_POLL: ::c_int = 69;
108+
// pub const SO_BUSY_POLL_BUDGET: ::c_int = 70;
107109

108110
cfg_if! {
109111
if #[cfg(any(target_arch = "x86",
@@ -114,16 +116,8 @@ cfg_if! {
114116
target_arch = "s390x"))] {
115117
pub const FICLONE: ::c_ulong = 0x40049409;
116118
pub const FICLONERANGE: ::c_ulong = 0x4020940D;
117-
} else if #[cfg(any(target_arch = "mips",
118-
target_arch = "mips64",
119-
target_arch = "powerpc",
120-
target_arch = "powerpc64"))] {
121-
pub const FICLONE: ::c_ulong = 0x80049409;
122-
pub const FICLONERANGE: ::c_ulong = 0x8020940D;
123119
}
124120
}
125-
// pub const SO_PREFER_BUSY_POLL: ::c_int = 69;
126-
// pub const SO_BUSY_POLL_BUDGET: ::c_int = 70;
127121

128122
// Defined in unix/linux_like/mod.rs
129123
// pub const SCM_TIMESTAMP: ::c_int = SO_TIMESTAMP;

src/unix/linux_like/linux/arch/mips/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ pub const SO_TIMESTAMPING: ::c_int = 37;
103103
// pub const SO_PREFER_BUSY_POLL: ::c_int = 69;
104104
// pub const SO_BUSY_POLL_BUDGET: ::c_int = 70;
105105

106+
pub const FICLONE: ::c_ulong = 0x80049409;
107+
pub const FICLONERANGE: ::c_ulong = 0x8020940D;
108+
106109
// Defined in unix/linux_like/mod.rs
107110
// pub const SCM_TIMESTAMP: ::c_int = SO_TIMESTAMP;
108111
pub const SCM_TIMESTAMPNS: ::c_int = SO_TIMESTAMPNS;

src/unix/linux_like/linux/arch/powerpc/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ pub const SO_BINDTOIFINDEX: ::c_int = 62;
8585
// pub const SO_PREFER_BUSY_POLL: ::c_int = 69;
8686
// pub const SO_BUSY_POLL_BUDGET: ::c_int = 70;
8787

88+
pub const FICLONE: ::c_ulong = 0x80049409;
89+
pub const FICLONERANGE: ::c_ulong = 0x8020940D;
90+
8891
// Defined in unix/linux_like/mod.rs
8992
// pub const SCM_TIMESTAMP: ::c_int = SO_TIMESTAMP;
9093
pub const SCM_TIMESTAMPNS: ::c_int = SO_TIMESTAMPNS;

0 commit comments

Comments
 (0)