diff options
| author | zhkag <[email protected]> | 2023-01-07 02:17:53 +0000 |
|---|---|---|
| committer | guo <[email protected]> | 2023-01-09 09:32:07 +0800 |
| commit | e6ce21e4b598c7e4d0268c28f888868ed3d220d9 (patch) | |
| tree | 8bc28f933e8786f11dc26d960348e3d6a19acde7 /components/libc | |
| parent | dcaa0c166d0379dba734fde47d911ba7ffd971ce (diff) | |
更新 mq_setattr
Diffstat (limited to 'components/libc')
| -rw-r--r-- | components/libc/posix/ipc/mqueue.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/components/libc/posix/ipc/mqueue.c b/components/libc/posix/ipc/mqueue.c index 8f78037c82..95150199c8 100644 --- a/components/libc/posix/ipc/mqueue.c +++ b/components/libc/posix/ipc/mqueue.c @@ -85,7 +85,10 @@ int mq_setattr(mqd_t mqdes, const struct mq_attr *mqstat, struct mq_attr *omqstat) { - rt_set_errno(-RT_ERROR); + if (mqstat == RT_NULL) + return mq_getattr(mqdes, omqstat); + else + rt_set_errno(-RT_ERROR); return -1; } |
