From 2c6ad421956cf282d2c6c22402ee7c8683cba161 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Sat, 24 Aug 2024 08:12:27 +0100 Subject: [PATCH] adding new illumos ptsname_r call. --- libc-test/semver/illumos.txt | 1 + src/unix/solarish/illumos.rs | 2 ++ src/unix/solarish/mod.rs | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/libc-test/semver/illumos.txt b/libc-test/semver/illumos.txt index d0ef608456d54..02cf4e75d688d 100644 --- a/libc-test/semver/illumos.txt +++ b/libc-test/semver/illumos.txt @@ -1,3 +1,4 @@ pthread_attr_get_np pthread_attr_getstackaddr pthread_attr_setstack +ptsname_r diff --git a/src/unix/solarish/illumos.rs b/src/unix/solarish/illumos.rs index ef3862ee41b34..6e96272352bee 100644 --- a/src/unix/solarish/illumos.rs +++ b/src/unix/solarish/illumos.rs @@ -100,4 +100,6 @@ extern "C" { pub fn pwritev(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int, offset: ::off_t) -> ::ssize_t; pub fn getpagesizes2(pagesize: *mut ::size_t, nelem: ::c_int) -> ::c_int; + + pub fn ptsname_r(fildes: ::c_int, name: *mut ::c_char, namelen: ::size_t) -> ::c_int; } diff --git a/src/unix/solarish/mod.rs b/src/unix/solarish/mod.rs index 27f3bf920c116..4d2c6503c5808 100644 --- a/src/unix/solarish/mod.rs +++ b/src/unix/solarish/mod.rs @@ -2154,7 +2154,7 @@ pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t { pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0; pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 2; pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 4; -pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_NORMAL; +pub const PTHREAD_MUTEX_DEFAULT: ::c_int = ::PTHREAD_MUTEX_NORMAL; pub const RTLD_NEXT: *mut ::c_void = -1isize as *mut ::c_void; pub const RTLD_DEFAULT: *mut ::c_void = -2isize as *mut ::c_void;