Page MenuHomeFreeBSD

D56399.id175543.diff
No OneTemporary

D56399.id175543.diff

diff --git a/sys/net/bpf.c b/sys/net/bpf.c
--- a/sys/net/bpf.c
+++ b/sys/net/bpf.c
@@ -1424,18 +1424,17 @@
#endif
{
struct timeval *tv = (struct timeval *)addr;
-#if defined(COMPAT_FREEBSD32)
+#ifdef COMPAT_FREEBSD32
struct timeval32 *tv32;
struct timeval tv64;
- if (cmd == BIOCSRTIMEOUT32) {
+ if (SV_CURPROC_FLAG(SV_ILP32)) {
tv32 = (struct timeval32 *)addr;
tv = &tv64;
tv->tv_sec = tv32->tv_sec;
tv->tv_usec = tv32->tv_usec;
- } else
+ }
#endif
- tv = (struct timeval *)addr;
/*
* Subtract 1 tick from tvtohz() since this isn't
@@ -1454,27 +1453,23 @@
case BIOCGRTIMEOUT32:
#endif
{
- struct timeval *tv;
-#if defined(COMPAT_FREEBSD32) && defined(__amd64__)
+ struct timeval *tv = (struct timeval *)addr;
+#ifdef COMPAT_FREEBSD32
struct timeval32 *tv32;
struct timeval tv64;
- if (cmd == BIOCGRTIMEOUT32)
+ if (SV_CURPROC_FLAG(SV_ILP32))
tv = &tv64;
- else
#endif
- tv = (struct timeval *)addr;
-
tv->tv_sec = d->bd_rtout / hz;
tv->tv_usec = (d->bd_rtout % hz) * tick;
-#if defined(COMPAT_FREEBSD32) && defined(__amd64__)
- if (cmd == BIOCGRTIMEOUT32) {
+#ifdef COMPAT_FREEBSD32
+ if (SV_CURPROC_FLAG(SV_ILP32)) {
tv32 = (struct timeval32 *)addr;
tv32->tv_sec = tv->tv_sec;
tv32->tv_usec = tv->tv_usec;
}
#endif
-
break;
}

File Metadata

Mime Type
text/plain
Expires
Mon, Jul 20, 3:26 PM (22 m, 26 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35276719
Default Alt Text
D56399.id175543.diff (1 KB)

Event Timeline