Commit dce67fa0 authored by Jan Kiszka's avatar Jan Kiszka

lib/cobalt: Change arg type in fcntl

Make use of the kernel interface change in c20ed9f1 to fix
truncation on 64-bit systems when passing pointers.
Reported-by: default avatarNorbert Lange <nolange79@gmail.com>
Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
parent add6d3f5
...@@ -145,11 +145,11 @@ static int do_ioctl(int fd, unsigned int request, void *arg) ...@@ -145,11 +145,11 @@ static int do_ioctl(int fd, unsigned int request, void *arg)
COBALT_IMPL(int, fcntl, (int fd, int cmd, ...)) COBALT_IMPL(int, fcntl, (int fd, int cmd, ...))
{ {
va_list ap; va_list ap;
int arg; long arg;
int ret; int ret;
va_start(ap, cmd); va_start(ap, cmd);
arg = va_arg(ap, int); arg = va_arg(ap, long);
va_end(ap); va_end(ap);
ret = XENOMAI_SYSCALL3(sc_cobalt_fcntl, fd, cmd, arg); ret = XENOMAI_SYSCALL3(sc_cobalt_fcntl, fd, cmd, arg);
......
...@@ -221,10 +221,10 @@ __weak ...@@ -221,10 +221,10 @@ __weak
int __real_fcntl(int fd, int cmd, ...) int __real_fcntl(int fd, int cmd, ...)
{ {
va_list ap; va_list ap;
int arg; long arg;
va_start(ap, cmd); va_start(ap, cmd);
arg = va_arg(ap, int); arg = va_arg(ap, long);
va_end(ap); va_end(ap);
return fcntl(fd, cmd, arg); return fcntl(fd, cmd, arg);
......
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