From c42379d6696c7dd0252714c94494eab19d45a423 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Tue, 16 Nov 2021 17:49:34 +0000 Subject: [PATCH] netbsd/openbsd ftok addition. --- libc-test/build.rs | 2 ++ libc-test/semver/netbsd.txt | 1 + libc-test/semver/openbsd.txt | 1 + src/unix/bsd/netbsdlike/mod.rs | 1 + 4 files changed, 5 insertions(+) diff --git a/libc-test/build.rs b/libc-test/build.rs index 34a72611045d5..dd0196dcffd0e 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -427,6 +427,7 @@ fn test_openbsd(target: &str) { "string.h", "sys/file.h", "sys/ioctl.h", + "sys/ipc.h", "sys/mman.h", "sys/param.h", "sys/resource.h", @@ -990,6 +991,7 @@ fn test_netbsd(target: &str) { "sys/file.h", "sys/ioctl.h", "sys/ioctl_compat.h", + "sys/ipc.h", "sys/ktrace.h", "sys/mman.h", "sys/mount.h", diff --git a/libc-test/semver/netbsd.txt b/libc-test/semver/netbsd.txt index cd06ccf8134b0..770e4226322cf 100644 --- a/libc-test/semver/netbsd.txt +++ b/libc-test/semver/netbsd.txt @@ -1183,6 +1183,7 @@ forkpty freeifaddrs freelocale fsid_t +ftok futimes getbootfile getbyteorder diff --git a/libc-test/semver/openbsd.txt b/libc-test/semver/openbsd.txt index c2053ccc9688a..989bd026df649 100644 --- a/libc-test/semver/openbsd.txt +++ b/libc-test/semver/openbsd.txt @@ -952,6 +952,7 @@ freelocale freezero fsid_t fstatfs +ftok fusefs_args futimes getdomainname diff --git a/src/unix/bsd/netbsdlike/mod.rs b/src/unix/bsd/netbsdlike/mod.rs index 4e9cd1bc8c640..7356e7ae23081 100644 --- a/src/unix/bsd/netbsdlike/mod.rs +++ b/src/unix/bsd/netbsdlike/mod.rs @@ -747,6 +747,7 @@ extern "C" { pub fn reallocarray(ptr: *mut ::c_void, nmemb: ::size_t, size: ::size_t) -> *mut ::c_void; pub fn gethostid() -> ::c_long; pub fn sethostid(hostid: ::c_long) -> ::c_int; + pub fn ftok(path: *const ::c_char, id: ::c_int) -> ::key_t; } cfg_if! {