#include <stdarg.h>
#include <math.h>
+#include <errno.h>
#include <fcntl.h>
+#include <unistd.h>
#ifdef HAVE_SYS_SHM_H
# include <sys/ipc.h>
# include <sys/shm.h>
{
sys->fd = vlc_open (path, O_RDONLY);
if (sys->fd == -1)
- msg_Err (demux, "cannot open file %s: %m", path);
+ msg_Err (demux, "cannot open file %s: %s", path,
+ vlc_strerror_c(errno));
free (path);
if (sys->fd == -1)
goto error;
if (mem == (const void *)(-1))
{
- msg_Err (demux, "cannot attach segment %d: %m", id);
+ msg_Err (demux, "cannot attach segment %d: %s", id,
+ vlc_strerror_c(errno));
goto error;
}
sys->mem.addr = mem;
/* Initializes format */
float rate = var_InheritFloat (obj, "shm-fps");
- if (rate <= 0.)
+ if (rate <= 0.f)
goto error;
mtime_t interval = llroundf((float)CLOCK_FREQ / rate);