Skip to content

Commit ff2ff25

Browse files
brad0JohnTitor
authored andcommitted
openbsd add elf_aux_info
(backport #4729) (cherry picked from commit 7062542)
1 parent 4ae44a4 commit ff2ff25

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

libc-test/build.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,7 @@ fn test_openbsd(target: &str) {
553553
"sys/syscall.h",
554554
"sys/shm.h",
555555
"sys/param.h",
556+
"sys/auxv.h",
556557
}
557558

558559
cfg.rename_type(|ty| match ty {

libc-test/semver/openbsd.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ ATF_PUBL
6363
ATF_USETRAILERS
6464
AT_EACCESS
6565
AT_FDCWD
66+
AT_HWCAP
67+
AT_HWCAP2
68+
AT_IGNORE
69+
AT_NULL
70+
AT_PAGESZ
6671
AT_REMOVEDIR
6772
AT_SYMLINK_FOLLOW
6873
AT_SYMLINK_NOFOLLOW
@@ -1095,6 +1100,7 @@ dl_phdr_info
10951100
drand48
10961101
dup3
10971102
duplocale
1103+
elf_aux_info
10981104
endgrent
10991105
endpwent
11001106
endservent

src/unix/bsd/netbsdlike/openbsd/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,6 +1041,12 @@ pub const AT_SYMLINK_NOFOLLOW: c_int = 0x02;
10411041
pub const AT_SYMLINK_FOLLOW: c_int = 0x04;
10421042
pub const AT_REMOVEDIR: c_int = 0x08;
10431043

1044+
pub const AT_NULL: c_int = 0;
1045+
pub const AT_IGNORE: c_int = 1;
1046+
pub const AT_PAGESZ: c_int = 6;
1047+
pub const AT_HWCAP: c_int = 25;
1048+
pub const AT_HWCAP2: c_int = 26;
1049+
10441050
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
10451051
pub const RLIM_NLIMITS: c_int = 9;
10461052

@@ -2093,6 +2099,8 @@ extern "C" {
20932099
pub fn fstatfs(fd: c_int, buf: *mut statfs) -> c_int;
20942100
pub fn getmntinfo(mntbufp: *mut *mut crate::statfs, flags: c_int) -> c_int;
20952101
pub fn getfsstat(buf: *mut statfs, bufsize: size_t, flags: c_int) -> c_int;
2102+
2103+
pub fn elf_aux_info(aux: c_int, buf: *mut c_void, buflen: c_int) -> c_int;
20962104
}
20972105

20982106
#[link(name = "execinfo")]

0 commit comments

Comments
 (0)