Skip to content

Commit d2ae83a

Browse files
committed
ohos: Add shm_open and shm_unlink
OpenHarmony 4.1 adds support for `shm_open` and `shm_unlink` so we can expose them unconditionally. Users developing for older OpenHarmony versions will only encounter a linker error if they attempt to use the functions. See OpenHarmony release notes for 4.1: https://gitee.com/openharmony/docs/blob/master/en/release-notes/OpenHarmony-v4.1-release.md#arkcompiler Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> (cherry picked from commit 9e248e2)
1 parent b31af9e commit d2ae83a

File tree

1 file changed

+3
-3
lines changed
  • src/unix/linux_like/linux

1 file changed

+3
-3
lines changed

src/unix/linux_like/linux/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4924,9 +4924,6 @@ cfg_if! {
49244924
spbufp: *mut *mut spwd,
49254925
) -> ::c_int;
49264926

4927-
pub fn shm_open(name: *const c_char, oflag: ::c_int, mode: mode_t) -> ::c_int;
4928-
pub fn shm_unlink(name: *const ::c_char) -> ::c_int;
4929-
49304927
pub fn mq_open(name: *const ::c_char, oflag: ::c_int, ...) -> ::mqd_t;
49314928
pub fn mq_close(mqd: ::mqd_t) -> ::c_int;
49324929
pub fn mq_unlink(name: *const ::c_char) -> ::c_int;
@@ -5013,6 +5010,9 @@ extern "C" {
50135010

50145011
pub fn getspnam(name: *const ::c_char) -> *mut spwd;
50155012

5013+
pub fn shm_open(name: *const c_char, oflag: ::c_int, mode: mode_t) -> ::c_int;
5014+
pub fn shm_unlink(name: *const ::c_char) -> ::c_int;
5015+
50165016
// System V IPC
50175017
pub fn shmget(key: ::key_t, size: ::size_t, shmflg: ::c_int) -> ::c_int;
50185018
pub fn shmat(shmid: ::c_int, shmaddr: *const ::c_void, shmflg: ::c_int) -> *mut ::c_void;

0 commit comments

Comments
 (0)