Commit d610d175 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

XCB: use vlc_strerror_c()

parent cabc6567
......@@ -25,6 +25,7 @@
#endif
#include <stdarg.h>
#include <assert.h>
#include <errno.h>
#include <xcb/xcb.h>
#include <xcb/composite.h>
#ifdef HAVE_SYS_SHM_H
......@@ -438,7 +439,8 @@ discard:
int id = shmget (IPC_PRIVATE, size, IPC_CREAT | 0777);
if (id == -1) /* XXX: fallback */
{
msg_Err (demux, "shared memory allocation error: %m");
msg_Err (demux, "shared memory allocation error: %s",
vlc_strerror_c(errno));
goto noshm;
}
......@@ -465,7 +467,8 @@ discard:
shmctl (id, IPC_RMID, 0);
if (-1 == (intptr_t)shm)
{
msg_Err (demux, "shared memory attachment error: %m");
msg_Err (demux, "shared memory attachment error: %s",
vlc_strerror_c(errno));
return;
}
......
......@@ -26,6 +26,7 @@
#include <stdlib.h>
#include <assert.h>
#include <errno.h>
#include <sys/types.h>
#ifdef HAVE_SYS_SHM_H
......@@ -90,7 +91,8 @@ int XCB_picture_Alloc (vout_display_t *vd, picture_resource_t *res,
int id = shmget (IPC_PRIVATE, size, IPC_CREAT | S_IRWXU);
if (id == -1)
{
msg_Err (vd, "shared memory allocation error: %m");
msg_Err (vd, "shared memory allocation error: %s",
vlc_strerror_c(errno));
return -1;
}
......@@ -98,7 +100,8 @@ int XCB_picture_Alloc (vout_display_t *vd, picture_resource_t *res,
void *shm = shmat (id, NULL, 0 /* read/write */);
if (-1 == (intptr_t)shm)
{
msg_Err (vd, "shared memory attachment error: %m");
msg_Err (vd, "shared memory attachment error: %s",
vlc_strerror_c(errno));
shmctl (id, IPC_RMID, 0);
return -1;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment