Skip to content

Add strftime* for illumos. #4453

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions libc-test/semver/solarish.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,5 @@ posix_spawnattr_setsigmask
posix_spawnp
recvmsg
sendmsg
strftime
strftime_l
15 changes: 15 additions & 0 deletions src/unix/solarish/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3202,6 +3202,21 @@ extern "C" {
pub fn arc4random_uniform(upper_bound: u32) -> u32;

pub fn secure_getenv(name: *const c_char) -> *mut c_char;

#[cfg_attr(target_os = "solaris", link_name = "__strftime_xpg7")]
pub fn strftime(
s: *mut c_char,
maxsize: size_t,
format: *const c_char,
timeptr: *const crate::tm,
) -> size_t;
pub fn strftime_l(
s: *mut c_char,
maxsize: size_t,
format: *const c_char,
timeptr: *const crate::tm,
loc: crate::locale_t,
) -> size_t;
}

#[link(name = "sendfile")]
Expand Down