Skip to content

Commit 203ff7f

Browse files
devnexentgross35
authored andcommitted
Adding strftime* for illumos/solaris.
[ref](https://smartos.org/man/3C/strftime) [ref](https://docs.oracle.com/cd/E88353_01/html/E37843/strftime-3c.html) Fixes: #4449 (backport <#4453>) (cherry picked from commit f4964b5)
1 parent 63011f6 commit 203ff7f

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

libc-test/semver/solarish.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,5 @@ posix_spawnattr_setsigmask
7575
posix_spawnp
7676
recvmsg
7777
sendmsg
78+
strftime
79+
strftime_l

src/unix/solarish/mod.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3130,6 +3130,21 @@ extern "C" {
31303130
pub fn arc4random_uniform(upper_bound: u32) -> u32;
31313131

31323132
pub fn secure_getenv(name: *const c_char) -> *mut c_char;
3133+
3134+
#[cfg_attr(target_os = "solaris", link_name = "__strftime_xpg7")]
3135+
pub fn strftime(
3136+
s: *mut c_char,
3137+
maxsize: size_t,
3138+
format: *const c_char,
3139+
timeptr: *const crate::tm,
3140+
) -> size_t;
3141+
pub fn strftime_l(
3142+
s: *mut c_char,
3143+
maxsize: size_t,
3144+
format: *const c_char,
3145+
timeptr: *const crate::tm,
3146+
loc: crate::locale_t,
3147+
) -> size_t;
31333148
}
31343149

31353150
#[link(name = "sendfile")]

0 commit comments

Comments
 (0)