From 166851e03e5ce6c9e3f2662affa965b73f758649 Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Wed, 4 Mar 2020 18:34:06 +0000 Subject: [PATCH 1/3] Need opt_inet.h for #ifdef INET, INET6. --- sys/altq/altq_flowvalve.h | 4 ++++ sys/dist/pf/net/pfvar.h | 4 ++++ sys/net/slcompress.h | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/sys/altq/altq_flowvalve.h b/sys/altq/altq_flowvalve.h index d1ae4ef7aecd..3c91724f1e60 100644 --- a/sys/altq/altq_flowvalve.h +++ b/sys/altq/altq_flowvalve.h @@ -32,6 +32,10 @@ #ifdef _KERNEL +#ifdef _KERNEL_OPT +#include "opt_inet.h" +#endif + /* fv_flow structure to define a unique address pair */ struct fv_flow { int flow_af; /* address family */ diff --git a/sys/dist/pf/net/pfvar.h b/sys/dist/pf/net/pfvar.h index 8d37a949356a..bec6d6e6262b 100644 --- a/sys/dist/pf/net/pfvar.h +++ b/sys/dist/pf/net/pfvar.h @@ -34,6 +34,10 @@ #ifndef _NET_PFVAR_H_ #define _NET_PFVAR_H_ +#ifdef _KERNEL_OPT +#include "opt_inet.h" +#endif + #include #include #include diff --git a/sys/net/slcompress.h b/sys/net/slcompress.h index 94fa98d3d3c0..0aa348cc9499 100644 --- a/sys/net/slcompress.h +++ b/sys/net/slcompress.h @@ -42,6 +42,10 @@ #ifndef _NET_SLCOMPRESS_H_ #define _NET_SLCOMPRESS_H_ +#ifdef _KERNEL_OPT +#include "opt_inet.h" +#endif + #define MAX_STATES 16 /* must be > 2 and < 256 */ #define MAX_HDR MLEN /* XXX 4bsd-ism: should really be 128 */ From 808e13c91945de8ec2659541f9ff7185f7fe5e18 Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Wed, 4 Mar 2020 18:40:30 +0000 Subject: [PATCH 2/3] Avoid duplicate definition of internal_state struct. --- sys/net/zlib.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/net/zlib.h b/sys/net/zlib.h index 2551c8d46cd4..6ab09baaf75f 100644 --- a/sys/net/zlib.h +++ b/sys/net/zlib.h @@ -135,6 +135,7 @@ #if defined(__MWERKS__) || defined(applec) ||defined(THINK_C) ||defined(__SC__) # define NO_DUMMY_DECL #endif +#define NO_DUMMY_DECL /* Old Borland C incorrectly complains about missing returns: */ #if defined(__BORLANDC__) && (__BORLANDC__ < 0x500) From 862b5cf8e2b15594a23f7e70c007f922de318c31 Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Wed, 4 Mar 2020 18:41:26 +0000 Subject: [PATCH 3/3] Avoid struct inode. This is an fs-independent structure in Linux. We don't actually use it as such; it's just a dummy struct tag. But we do have an actual struct inode in ufs and in lfs, and using the same struct tag here confuses ctf leading to four copies of pretty much every drm data structure. --- sys/external/bsd/drm2/dist/drm/drm_drv.c | 6 ++---- sys/external/bsd/drm2/dist/include/drm/drmP.h | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/sys/external/bsd/drm2/dist/drm/drm_drv.c b/sys/external/bsd/drm2/dist/drm/drm_drv.c index 3731fb891899..007d7e75cb7a 100644 --- a/sys/external/bsd/drm2/dist/drm/drm_drv.c +++ b/sys/external/bsd/drm2/dist/drm/drm_drv.c @@ -540,16 +540,14 @@ EXPORT_SYMBOL(drm_unplug_dev); #ifdef __NetBSD__ -struct inode; - -static struct inode * +static void * drm_fs_inode_new(void) { return NULL; } static void -drm_fs_inode_free(struct inode *inode) +drm_fs_inode_free(void *inode) { KASSERT(inode == NULL); } diff --git a/sys/external/bsd/drm2/dist/include/drm/drmP.h b/sys/external/bsd/drm2/dist/include/drm/drmP.h index 74f7adc9e0f7..4d2590629151 100644 --- a/sys/external/bsd/drm2/dist/include/drm/drmP.h +++ b/sys/external/bsd/drm2/dist/include/drm/drmP.h @@ -827,7 +827,7 @@ struct drm_device { struct drm_minor *primary; /**< Primary node */ struct drm_minor *render; /**< Render node */ atomic_t unplugged; /**< Flag whether dev is dead */ - struct inode *anon_inode; /**< inode for private address-space */ + void *anon_inode; /**< inode for private address-space */ char *unique; /**< unique name of the device */ /*@} */