Page MenuHomeFreeBSD

D44381.id135972.diff
No OneTemporary

D44381.id135972.diff

diff --git a/lib/libc/include/libc_private.h b/lib/libc/include/libc_private.h
--- a/lib/libc/include/libc_private.h
+++ b/lib/libc/include/libc_private.h
@@ -344,7 +344,7 @@
int __sys_close(int);
int __sys_close_range(unsigned, unsigned, int);
int __sys_connect(int, const struct sockaddr *, __socklen_t);
-int __sys_fcntl(int, int, ...);
+int __sys_fcntl(int, int, __intptr_t);
int __sys_fdatasync(int);
int __sys_fstat(int fd, struct stat *);
int __sys_fstatfs(int fd, struct statfs *);
diff --git a/lib/libthr/thread/thr_syscalls.c b/lib/libthr/thread/thr_syscalls.c
--- a/lib/libthr/thread/thr_syscalls.c
+++ b/lib/libthr/thread/thr_syscalls.c
@@ -198,10 +198,10 @@
va_start(ap, cmd);
if (cmd == F_OSETLKW || cmd == F_SETLKW) {
_thr_cancel_enter(curthread);
- ret = __sys_fcntl(fd, cmd, va_arg(ap, void *));
+ ret = __sys_fcntl(fd, cmd, (intptr_t)va_arg(ap, void *));
_thr_cancel_leave(curthread, ret == -1);
} else {
- ret = __sys_fcntl(fd, cmd, va_arg(ap, void *));
+ ret = __sys_fcntl(fd, cmd, (intptr_t)va_arg(ap, void *));
}
va_end(ap);
diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c
--- a/sys/compat/freebsd32/freebsd32_misc.c
+++ b/sys/compat/freebsd32/freebsd32_misc.c
@@ -3942,7 +3942,7 @@
int
freebsd32_fcntl(struct thread *td, struct freebsd32_fcntl_args *uap)
{
- long tmp;
+ intptr_t tmp;
switch (uap->cmd) {
/*
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -414,7 +414,7 @@
}
int
-kern_fcntl_freebsd(struct thread *td, int fd, int cmd, long arg)
+kern_fcntl_freebsd(struct thread *td, int fd, int cmd, intptr_t arg)
{
struct flock fl;
struct __oflock ofl;
@@ -430,7 +430,7 @@
/*
* Convert old flock structure to new.
*/
- error = copyin((void *)(intptr_t)arg, &ofl, sizeof(ofl));
+ error = copyin((void *)arg, &ofl, sizeof(ofl));
fl.l_start = ofl.l_start;
fl.l_len = ofl.l_len;
fl.l_pid = ofl.l_pid;
@@ -455,7 +455,7 @@
case F_SETLK:
case F_SETLKW:
case F_SETLK_REMOTE:
- error = copyin((void *)(intptr_t)arg, &fl, sizeof(fl));
+ error = copyin((void *)arg, &fl, sizeof(fl));
arg1 = (intptr_t)&fl;
break;
default:
@@ -473,9 +473,9 @@
ofl.l_pid = fl.l_pid;
ofl.l_type = fl.l_type;
ofl.l_whence = fl.l_whence;
- error = copyout(&ofl, (void *)(intptr_t)arg, sizeof(ofl));
+ error = copyout(&ofl, (void *)arg, sizeof(ofl));
} else if (cmd == F_GETLK) {
- error = copyout(&fl, (void *)(intptr_t)arg, sizeof(fl));
+ error = copyout(&fl, (void *)arg, sizeof(fl));
}
return (error);
}
diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master
--- a/sys/kern/syscalls.master
+++ b/sys/kern/syscalls.master
@@ -616,7 +616,7 @@
int fcntl(
int fd,
int cmd,
- long arg
+ intptr_t arg
);
}
; XXX should be { int fcntl(int fd, int cmd, ...); }

File Metadata

Mime Type
text/plain
Expires
Thu, Jan 9, 9:58 PM (9 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15736367
Default Alt Text
D44381.id135972.diff (2 KB)

Event Timeline