Module Name:    src
Committed By:   martin
Date:           Wed Sep 13 09:50:51 UTC 2023

Modified Files:
        src/sys/net [netbsd-10]: bpf.h

Log Message:
Pull up following revision(s) (requested by rin in ticket #373):

        sys/net/bpf.h: revision 1.82

bpf: Fix SIZEOF_BPF_HDR (for LP64 userland) on mips64

It cannot fit within 18 bytes, of course ;)

As we had never provided working bpf(4) implementation for LP64
userland on mips, just use natural structure size here.


To generate a diff of this commit:
cvs rdiff -u -r1.78 -r1.78.4.1 src/sys/net/bpf.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/net/bpf.h
diff -u src/sys/net/bpf.h:1.78 src/sys/net/bpf.h:1.78.4.1
--- src/sys/net/bpf.h:1.78	Mon Jun 20 08:20:09 2022
+++ src/sys/net/bpf.h	Wed Sep 13 09:50:50 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: bpf.h,v 1.78 2022/06/20 08:20:09 yamaguchi Exp $	*/
+/*	$NetBSD: bpf.h,v 1.78.4.1 2023/09/13 09:50:50 martin Exp $	*/
 
 /*
  * Copyright (c) 1990, 1991, 1993
@@ -204,7 +204,10 @@ struct bpf_hdr32 {
  * XXX fail-safe: on new machines, we just use the 'safe' sizeof.
  */
 #ifdef _KERNEL
-#if defined(__arm32__) || defined(__i386__) || defined(__m68k__) || \
+#if defined(__mips64)
+#define SIZEOF_BPF_HDR sizeof(struct bpf_hdr)
+#define SIZEOF_BPF_HDR32 18
+#elif defined(__arm32__) || defined(__i386__) || defined(__m68k__) || \
     defined(__mips__) || defined(__ns32k__) || defined(__vax__) || \
     defined(__sh__) || (defined(__sparc__) && !defined(__sparc64__))
 #define SIZEOF_BPF_HDR 18

Reply via email to