Skip to content

Commit 9e248e2

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>
1 parent acc7bb1 commit 9e248e2

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
@@ -5392,9 +5392,6 @@ cfg_if! {
53925392
spbufp: *mut *mut spwd,
53935393
) -> ::c_int;
53945394

5395-
pub fn shm_open(name: *const c_char, oflag: ::c_int, mode: mode_t) -> ::c_int;
5396-
pub fn shm_unlink(name: *const ::c_char) -> ::c_int;
5397-
53985395
pub fn mq_open(name: *const ::c_char, oflag: ::c_int, ...) -> ::mqd_t;
53995396
pub fn mq_close(mqd: ::mqd_t) -> ::c_int;
54005397
pub fn mq_unlink(name: *const ::c_char) -> ::c_int;
@@ -5481,6 +5478,9 @@ extern "C" {
54815478

54825479
pub fn getspnam(name: *const ::c_char) -> *mut spwd;
54835480

5481+
pub fn shm_open(name: *const c_char, oflag: ::c_int, mode: mode_t) -> ::c_int;
5482+
pub fn shm_unlink(name: *const ::c_char) -> ::c_int;
5483+
54845484
// System V IPC
54855485
pub fn shmget(key: ::key_t, size: ::size_t, shmflg: ::c_int) -> ::c_int;
54865486
pub fn shmat(shmid: ::c_int, shmaddr: *const ::c_void, shmflg: ::c_int) -> *mut ::c_void;

0 commit comments

Comments
 (0)