Skip to content

Commit 2543b7c

Browse files
committed
bump kernel headers to 4.4.2-2
1 parent 1cbc523 commit 2543b7c

File tree

11 files changed

+88
-25
lines changed

11 files changed

+88
-25
lines changed

ci/docker/mips-unknown-linux-musl/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ RUN mkdir /toolchain
99
# Note that this originally came from:
1010
# https://downloads.openwrt.org/snapshots/targets/ar71xx/generic/openwrt-sdk-ar71xx-generic_gcc-7.4.0_musl.Linux-x86_64.tar.xz
1111
RUN curl --retry 5 -L https://downloads.openwrt.org/snapshots/targets/ar71xx/generic/openwrt-sdk-ar71xx-generic_gcc-7.4.0_musl.Linux-x86_64.tar.xz | \
12-
tar xf - -C /toolchain --strip-components=1
12+
tar xf -J - -C /toolchain --strip-components=1
1313

1414
ENV PATH=$PATH:/rust/bin:/toolchain/staging_dir/toolchain-mips_34kc_gcc-7.4.0_musl.Linux-x86_64/bin \
1515
CC_mips_unknown_linux_musl=mips-openwrt-linux-gcc \

ci/install-musl.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,12 @@ cd ..
5858
rm -rf $MUSL
5959

6060
# Download, configure, build, and install musl-sanitized kernel headers:
61+
KERNEL_HEADER_VER="4.4.2-2"
6162
curl --retry 5 -L \
62-
https://github.com/sabotage-linux/kernel-headers/archive/v4.4.2-1.tar.gz | \
63+
"https://github.com/sabotage-linux/kernel-headers/archive/v${KERNEL_HEADER_VER}.tar.gz" | \
6364
tar xzf -
6465
(
65-
cd kernel-headers-4.4.2-1
66+
cd kernel-headers-${KERNEL_HEADER_VER}
6667
make ARCH="${kernel_arch}" prefix="/musl-${musl_arch}" install -j4
6768
)
68-
rm -rf kernel-headers-4.4.2-1
69+
rm -rf kernel-headers-${KERNEL_HEADER_VER}

libc-test/build.rs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2130,6 +2130,7 @@ fn test_linux(target: &str) {
21302130
"linux/fs.h",
21312131
"linux/futex.h",
21322132
"linux/genetlink.h",
2133+
"linux/if.h",
21332134
"linux/if_addr.h",
21342135
"linux/if_alg.h",
21352136
"linux/if_ether.h",
@@ -2152,11 +2153,6 @@ fn test_linux(target: &str) {
21522153
"sys/auxv.h",
21532154
}
21542155

2155-
// FIXME: https://github.com/sabotage-linux/kernel-headers/issues/16
2156-
if !musl {
2157-
headers!{ cfg: "linux/if.h" }
2158-
}
2159-
21602156
// note: aio.h must be included before sys/mount.h
21612157
headers! { cfg:
21622158
"sys/xattr.h",
@@ -2305,6 +2301,9 @@ fn test_linux(target: &str) {
23052301
// `linux_termios.rs` below:
23062302
"BOTHER" => true,
23072303

2304+
// FIXME: on musl the pthread types are defined a little differently
2305+
// - these constants are used by the glibc implementation.
2306+
n if musl && n.contains("__SIZEOF_PTHREAD") => true,
23082307
_ => false,
23092308
}
23102309
});
@@ -2332,6 +2331,12 @@ fn test_linux(target: &str) {
23322331
// test the XSI version below.
23332332
"strerror_r" => true,
23342333

2334+
// FIXME: Our API is unsound. The Rust API allows aliasing
2335+
// pointers, but the C API requires pointers not to alias.
2336+
// We should probably be at least using `&`/`&mut` here, see:
2337+
// https://github.com/gnzlbg/ctest/issues/68
2338+
"lio_listio" if musl => true,
2339+
23352340
_ => false,
23362341
}
23372342
});

src/unix/notbsd/android/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1924,6 +1924,10 @@ f! {
19241924
}
19251925

19261926
extern {
1927+
pub fn getrlimit64(resource: ::c_int,
1928+
rlim: *mut rlimit64) -> ::c_int;
1929+
pub fn setrlimit64(resource: ::c_int,
1930+
rlim: *const rlimit64) -> ::c_int;
19271931
pub fn getrlimit(resource: ::c_int, rlim: *mut ::rlimit) -> ::c_int;
19281932
pub fn setrlimit(resource: ::c_int, rlim: *const ::rlimit) -> ::c_int;
19291933
pub fn strerror_r(errnum: ::c_int, buf: *mut c_char,

src/unix/notbsd/emscripten/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1688,6 +1688,10 @@ f! {
16881688
}
16891689

16901690
extern {
1691+
pub fn getrlimit64(resource: ::c_int,
1692+
rlim: *mut rlimit64) -> ::c_int;
1693+
pub fn setrlimit64(resource: ::c_int,
1694+
rlim: *const rlimit64) -> ::c_int;
16911695
pub fn getrlimit(resource: ::c_int, rlim: *mut ::rlimit) -> ::c_int;
16921696
pub fn setrlimit(resource: ::c_int, rlim: *const ::rlimit) -> ::c_int;
16931697
pub fn strerror_r(errnum: ::c_int, buf: *mut c_char,

src/unix/notbsd/linux/mips/mod.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ pub type fsblkcnt_t = ::c_ulong;
66
pub type fsfilcnt_t = ::c_ulong;
77
pub type rlim_t = c_ulong;
88
pub type __priority_which_t = ::c_uint;
9+
pub type __rlimit_resource_t = ::c_uint;
910

1011
s! {
1112
pub struct glob64_t {
@@ -906,6 +907,21 @@ f! {
906907

907908
#[link(name = "util")]
908909
extern {
910+
pub fn getrlimit64(resource: ::__rlimit_resource_t,
911+
rlim: *mut ::rlimit64) -> ::c_int;
912+
pub fn setrlimit64(resource: ::__rlimit_resource_t,
913+
rlim: *const ::rlimit64) -> ::c_int;
914+
pub fn getrlimit(resource: ::__rlimit_resource_t,
915+
rlim: *mut ::rlimit) -> ::c_int;
916+
pub fn setrlimit(resource: ::__rlimit_resource_t,
917+
rlim: *const ::rlimit) -> ::c_int;
918+
pub fn prlimit(pid: ::pid_t,
919+
resource: ::__rlimit_resource_t, new_limit: *const ::rlimit,
920+
old_limit: *mut ::rlimit) -> ::c_int;
921+
pub fn prlimit64(pid: ::pid_t,
922+
resource: ::__rlimit_resource_t,
923+
new_limit: *const ::rlimit64,
924+
old_limit: *mut ::rlimit64) -> ::c_int;
909925
pub fn sysctl(name: *mut ::c_int,
910926
namelen: ::c_int,
911927
oldp: *mut ::c_void,

src/unix/notbsd/linux/mod.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2265,17 +2265,6 @@ extern {
22652265
flags: ::c_int) -> ::c_int;
22662266
pub fn pthread_setschedprio(native: ::pthread_t,
22672267
priority: ::c_int) -> ::c_int;
2268-
pub fn getrlimit(resource: ::__rlimit_resource_t,
2269-
rlim: *mut ::rlimit) -> ::c_int;
2270-
pub fn setrlimit(resource: ::__rlimit_resource_t,
2271-
rlim: *const ::rlimit) -> ::c_int;
2272-
pub fn prlimit(pid: ::pid_t,
2273-
resource: ::__rlimit_resource_t, new_limit: *const ::rlimit,
2274-
old_limit: *mut ::rlimit) -> ::c_int;
2275-
pub fn prlimit64(pid: ::pid_t,
2276-
resource: ::__rlimit_resource_t,
2277-
new_limit: *const ::rlimit64,
2278-
old_limit: *mut ::rlimit64) -> ::c_int;
22792268
pub fn getloadavg(loadavg: *mut ::c_double, nelem: ::c_int) -> ::c_int;
22802269
pub fn process_vm_readv(pid: ::pid_t,
22812270
local_iov: *const ::iovec,

src/unix/notbsd/linux/musl/mod.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,22 @@ pub const SO_PEEK_OFF: ::c_int = 42;
332332
pub const SO_BUSY_POLL: ::c_int = 46;
333333

334334
extern {
335+
pub fn getrlimit64(resource: ::c_int,
336+
rlim: *mut ::rlimit64) -> ::c_int;
337+
pub fn setrlimit64(resource: ::c_int,
338+
rlim: *const ::rlimit64) -> ::c_int;
339+
pub fn getrlimit(resource: ::c_int,
340+
rlim: *mut ::rlimit) -> ::c_int;
341+
pub fn setrlimit(resource: ::c_int,
342+
rlim: *const ::rlimit) -> ::c_int;
343+
pub fn prlimit(pid: ::pid_t,
344+
resource: ::c_int, new_limit: *const ::rlimit,
345+
old_limit: *mut ::rlimit) -> ::c_int;
346+
pub fn prlimit64(pid: ::pid_t,
347+
resource: ::c_int,
348+
new_limit: *const ::rlimit64,
349+
old_limit: *mut ::rlimit64) -> ::c_int;
350+
335351
pub fn gettimeofday(tp: *mut ::timeval,
336352
tz: *mut ::c_void) -> ::c_int;
337353
pub fn ptrace(request: ::c_int, ...) -> ::c_long;

src/unix/notbsd/linux/other/mod.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
pub type pthread_t = c_ulong;
22
pub type __priority_which_t = ::c_uint;
3+
pub type __rlimit_resource_t = ::c_uint;
34

45
s! {
56
pub struct aiocb {
@@ -949,6 +950,21 @@ f! {
949950
}
950951

951952
extern {
953+
pub fn getrlimit64(resource: ::__rlimit_resource_t,
954+
rlim: *mut ::rlimit64) -> ::c_int;
955+
pub fn setrlimit64(resource: ::__rlimit_resource_t,
956+
rlim: *const ::rlimit64) -> ::c_int;
957+
pub fn getrlimit(resource: ::__rlimit_resource_t,
958+
rlim: *mut ::rlimit) -> ::c_int;
959+
pub fn setrlimit(resource: ::__rlimit_resource_t,
960+
rlim: *const ::rlimit) -> ::c_int;
961+
pub fn prlimit(pid: ::pid_t,
962+
resource: ::__rlimit_resource_t, new_limit: *const ::rlimit,
963+
old_limit: *mut ::rlimit) -> ::c_int;
964+
pub fn prlimit64(pid: ::pid_t,
965+
resource: ::__rlimit_resource_t,
966+
new_limit: *const ::rlimit64,
967+
old_limit: *mut ::rlimit64) -> ::c_int;
952968
pub fn utmpxname(file: *const ::c_char) -> ::c_int;
953969
pub fn getutxent() -> *mut utmpx;
954970
pub fn getutxid(ut: *const utmpx) -> *mut utmpx;

src/unix/notbsd/linux/s390x/mod.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use ::pthread_mutex_t;
22

3+
pub type __rlimit_resource_t = ::c_uint;
34
pub type pthread_t = c_ulong;
45
pub type blkcnt_t = i64;
56
pub type blksize_t = i64;
@@ -1316,6 +1317,22 @@ pub const SYS_newfstatat: ::c_long = 293;
13161317

13171318
#[link(name = "util")]
13181319
extern {
1320+
pub fn getrlimit64(resource: ::__rlimit_resource_t,
1321+
rlim: *mut ::rlimit64) -> ::c_int;
1322+
pub fn setrlimit64(resource: ::__rlimit_resource_t,
1323+
rlim: *const ::rlimit64) -> ::c_int;
1324+
pub fn getrlimit(resource: ::__rlimit_resource_t,
1325+
rlim: *mut ::rlimit) -> ::c_int;
1326+
pub fn setrlimit(resource: ::__rlimit_resource_t,
1327+
rlim: *const ::rlimit) -> ::c_int;
1328+
pub fn prlimit(pid: ::pid_t,
1329+
resource: ::__rlimit_resource_t, new_limit: *const ::rlimit,
1330+
old_limit: *mut ::rlimit) -> ::c_int;
1331+
pub fn prlimit64(pid: ::pid_t,
1332+
resource: ::__rlimit_resource_t,
1333+
new_limit: *const ::rlimit64,
1334+
old_limit: *mut ::rlimit64) -> ::c_int;
1335+
13191336
pub fn sysctl(name: *mut ::c_int,
13201337
namelen: ::c_int,
13211338
oldp: *mut ::c_void,

src/unix/notbsd/mod.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ pub type tcflag_t = ::c_uint;
44
pub type clockid_t = ::c_int;
55
pub type key_t = ::c_int;
66
pub type id_t = ::c_uint;
7-
pub type __rlimit_resource_t = ::c_uint;
87

98
#[cfg_attr(feature = "extra_traits", derive(Debug))]
109
pub enum timezone {}
@@ -1305,8 +1304,6 @@ extern {
13051304
pub fn fstatat64(dirfd: ::c_int, pathname: *const c_char,
13061305
buf: *mut stat64, flags: ::c_int) -> ::c_int;
13071306
pub fn ftruncate64(fd: ::c_int, length: off64_t) -> ::c_int;
1308-
pub fn getrlimit64(resource: ::__rlimit_resource_t,
1309-
rlim: *mut rlimit64) -> ::c_int;
13101307
pub fn lseek64(fd: ::c_int, offset: off64_t, whence: ::c_int) -> off64_t;
13111308
pub fn lstat64(path: *const c_char, buf: *mut stat64) -> ::c_int;
13121309
pub fn mmap64(addr: *mut ::c_void,
@@ -1335,8 +1332,6 @@ extern {
13351332
pub fn readdir64(dirp: *mut ::DIR) -> *mut ::dirent64;
13361333
pub fn readdir64_r(dirp: *mut ::DIR, entry: *mut ::dirent64,
13371334
result: *mut *mut ::dirent64) -> ::c_int;
1338-
pub fn setrlimit64(resource: ::__rlimit_resource_t,
1339-
rlim: *const rlimit64) -> ::c_int;
13401335
pub fn stat64(path: *const c_char, buf: *mut stat64) -> ::c_int;
13411336
pub fn truncate64(path: *const c_char, length: off64_t) -> ::c_int;
13421337

0 commit comments

Comments
 (0)