| Message ID | 20180704160941.3261-2-christophe.lyon@st.com |
|---|---|
| State | Accepted |
| Headers | show |
| Series | None | expand |
diff --git a/librt/shm.c b/librt/shm.c index 40e69fa..79c98a3 100644 --- a/librt/shm.c +++ b/librt/shm.c @@ -84,6 +84,9 @@ int shm_open(const char *name, int oflag, mode_t mode) */ } #endif + if (fd < 0 && errno == EISDIR) + /* EISDIR is not valid for shm_open, replace it with EINVAL as glibc. */ + __set_errno (EINVAL); free(shm_name); /* doesn't affect errno */ return fd; }