From b1afbb311c0650d5e83763fa6e2bc38f39a612c6 Mon Sep 17 00:00:00 2001 From: matt Date: Sat, 28 Jul 2012 00:43:22 +0000 Subject: [PATCH] Fix -fno-common found by building i386/conf/ALL --- sys/compat/ndis/ntoskrnl_var.h | 2 +- sys/compat/ndis/subr_hal.c | 6 +++++- sys/dev/dm/dm.h | 5 +++-- sys/dev/ic/ncr5380sbc.c | 5 +++-- sys/dev/ic/ncr5380var.h | 4 ++-- sys/dev/if_ndis/if_ndis.c | 6 ++++-- sys/dev/if_ndis/if_ndisvar.h | 4 ++-- sys/fs/hfs/libhfs.c | 13 +++++++++++-- sys/fs/hfs/libhfs.h | 6 +++--- sys/fs/nilfs/nilfs.h | 4 ++-- sys/kern/kgdb_stub.c | 9 +++++++-- sys/net/if_etherip.c | 6 ++++-- sys/net/if_etherip.h | 5 +++-- sys/net/npf/npf_impl.h | 4 ++-- sys/netiso/eonvar.h | 4 ++-- sys/netiso/if_eon.c | 5 +++-- 16 files changed, 57 insertions(+), 31 deletions(-) diff --git a/sys/compat/ndis/ntoskrnl_var.h b/sys/compat/ndis/ntoskrnl_var.h index 4c7116be94e7..ac5223f61d0d 100644 --- a/sys/compat/ndis/ntoskrnl_var.h +++ b/sys/compat/ndis/ntoskrnl_var.h @@ -302,7 +302,7 @@ typedef struct nt_dispatch_header nt_dispatch_header; /* TODO: What is the best way to do this? */ -int win_irql; +extern int win_irql; #define AT_DISPATCH_LEVEL(useless) \ (win_irql == DISPATCH_LEVEL) diff --git a/sys/compat/ndis/subr_hal.c b/sys/compat/ndis/subr_hal.c index 555cc0891bde..c83f6d66d2bb 100644 --- a/sys/compat/ndis/subr_hal.c +++ b/sys/compat/ndis/subr_hal.c @@ -35,7 +35,7 @@ __FBSDID("$FreeBSD: src/sys/compat/ndis/subr_hal.c,v 1.13.2.3 2005/03/31 04:24:35 wpaul Exp $"); #endif #ifdef __NetBSD__ -__KERNEL_RCSID(0, "$NetBSD: subr_hal.c,v 1.7 2009/03/18 10:22:39 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_hal.c,v 1.8 2012/07/28 00:43:22 matt Exp $"); #endif #include @@ -95,6 +95,10 @@ __stdcall static void dummy (void); extern struct mtx_pool *ndis_mtxpool; +#ifdef __NetBSD__ +int win_irql; +#endif + int hal_libinit(void) { diff --git a/sys/dev/dm/dm.h b/sys/dev/dm/dm.h index e22eb14e9e00..d843614b683d 100644 --- a/sys/dev/dm/dm.h +++ b/sys/dev/dm/dm.h @@ -1,4 +1,4 @@ -/* $NetBSD: dm.h,v 1.23 2011/08/27 17:07:49 ahoka Exp $ */ +/* $NetBSD: dm.h,v 1.24 2012/07/28 00:43:22 matt Exp $ */ /* * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -120,7 +120,8 @@ typedef struct dm_pdev { * This structure is called for every device-mapper device. * It points to SLIST of device tables and mirrored, snapshoted etc. devices. */ -TAILQ_HEAD(dm_dev_head, dm_dev) dm_devs; +TAILQ_HEAD(dm_dev_head, dm_dev); +//extern struct dm_dev_head dm_devs; typedef struct dm_dev { char name[DM_NAME_LEN]; diff --git a/sys/dev/ic/ncr5380sbc.c b/sys/dev/ic/ncr5380sbc.c index 4638c2b6217f..a904ce18706b 100644 --- a/sys/dev/ic/ncr5380sbc.c +++ b/sys/dev/ic/ncr5380sbc.c @@ -1,4 +1,4 @@ -/* $NetBSD: ncr5380sbc.c,v 1.65 2010/07/27 19:44:16 jakllsch Exp $ */ +/* $NetBSD: ncr5380sbc.c,v 1.66 2012/07/28 00:43:23 matt Exp $ */ /* * Copyright (c) 1995 David Jones, Gordon W. Ross @@ -71,7 +71,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ncr5380sbc.c,v 1.65 2010/07/27 19:44:16 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ncr5380sbc.c,v 1.66 2012/07/28 00:43:23 matt Exp $"); #include "opt_ddb.h" @@ -135,6 +135,7 @@ void ncr5380_cmd_timeout(void *); #endif #ifdef NCR5380_DEBUG +struct ncr5380_softc *ncr5380_debug_sc; #define NCR_DBG_BREAK 1 #define NCR_DBG_CMDS 2 diff --git a/sys/dev/ic/ncr5380var.h b/sys/dev/ic/ncr5380var.h index 81fa9c04817b..169a2ecd6a4d 100644 --- a/sys/dev/ic/ncr5380var.h +++ b/sys/dev/ic/ncr5380var.h @@ -1,4 +1,4 @@ -/* $NetBSD: ncr5380var.h,v 1.32 2008/04/04 16:00:58 tsutsui Exp $ */ +/* $NetBSD: ncr5380var.h,v 1.33 2012/07/28 00:43:23 matt Exp $ */ /* * Copyright (c) 1995 David Jones, Gordon W. Ross @@ -236,7 +236,7 @@ int ncr5380_pio_out(struct ncr5380_softc *, int, int, uint8_t *); void ncr5380_init(struct ncr5380_softc *); #ifdef NCR5380_DEBUG -struct ncr5380_softc *ncr5380_debug_sc; +extern struct ncr5380_softc *ncr5380_debug_sc; void ncr5380_trace(const char *msg, long val); #define NCR_TRACE(msg, val) ncr5380_trace(msg, val) #else /* NCR5380_DEBUG */ diff --git a/sys/dev/if_ndis/if_ndis.c b/sys/dev/if_ndis/if_ndis.c index 2b35ffe1c8c5..19fb2fcfd784 100644 --- a/sys/dev/if_ndis/if_ndis.c +++ b/sys/dev/if_ndis/if_ndis.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_ndis.c,v 1.32 2011/05/14 12:44:15 rmind Exp $ */ +/* $NetBSD: if_ndis.c,v 1.33 2012/07/28 00:43:23 matt Exp $ */ /*- * Copyright (c) 2003 @@ -37,7 +37,7 @@ __FBSDID("$FreeBSD: src/sys/dev/if_ndis/if_ndis.c,v 1.69.2.6 2005/03/31 04:24:36 wpaul Exp $"); #endif #ifdef __NetBSD__ -__KERNEL_RCSID(0, "$NetBSD: if_ndis.c,v 1.32 2011/05/14 12:44:15 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ndis.c,v 1.33 2012/07/28 00:43:23 matt Exp $"); #endif @@ -145,6 +145,8 @@ static void ndis_setmulti (struct ndis_softc *); static void ndis_map_sclist (void *, bus_dma_segment_t *, int, bus_size_t, int); +int ndis_in_isr; + #ifdef _MODULE static int ndisdrv_loaded = 0; diff --git a/sys/dev/if_ndis/if_ndisvar.h b/sys/dev/if_ndis/if_ndisvar.h index dae4a7775add..d7c5d2809704 100644 --- a/sys/dev/if_ndis/if_ndisvar.h +++ b/sys/dev/if_ndis/if_ndisvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: if_ndisvar.h,v 1.7 2011/05/14 12:44:16 rmind Exp $ */ +/* $NetBSD: if_ndisvar.h,v 1.8 2012/07/28 00:43:23 matt Exp $ */ /*- * Copyright (c) 2003 @@ -107,7 +107,7 @@ struct ndis_resource { #endif #ifdef __NetBSD__ -int ndis_in_isr; +extern int ndis_in_isr; #endif struct ndis_softc { diff --git a/sys/fs/hfs/libhfs.c b/sys/fs/hfs/libhfs.c index c78c8c270fca..751dd0e7142e 100644 --- a/sys/fs/hfs/libhfs.c +++ b/sys/fs/hfs/libhfs.c @@ -1,4 +1,4 @@ -/* $NetBSD: libhfs.c,v 1.11 2012/06/15 21:59:39 joerg Exp $ */ +/* $NetBSD: libhfs.c,v 1.12 2012/07/28 00:43:23 matt Exp $ */ /*- * Copyright (c) 2005, 2007 The NetBSD Foundation, Inc. @@ -47,7 +47,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: libhfs.c,v 1.11 2012/06/15 21:59:39 joerg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: libhfs.c,v 1.12 2012/07/28 00:43:23 matt Exp $"); #include "libhfs.h" @@ -66,6 +66,15 @@ extern uint16_t be16tohp(void** inout_ptr); extern uint32_t be32tohp(void** inout_ptr); extern uint64_t be64tohp(void** inout_ptr); +hfs_callbacks hfs_gcb; /* global callbacks */ + +/* + * global case folding table + * (lazily initialized; see comments at bottom of hfs_open_volume()) + */ +unichar_t* hfs_gcft; + + int hfslib_create_casefolding_table(void); #ifdef DLO_DEBUG diff --git a/sys/fs/hfs/libhfs.h b/sys/fs/hfs/libhfs.h index ceec8af52fd8..305e7278e152 100644 --- a/sys/fs/hfs/libhfs.h +++ b/sys/fs/hfs/libhfs.h @@ -1,4 +1,4 @@ -/* $NetBSD: libhfs.h,v 1.5 2011/07/17 20:54:51 joerg Exp $ */ +/* $NetBSD: libhfs.h,v 1.6 2012/07/28 00:43:23 matt Exp $ */ /*- * Copyright (c) 2005, 2007 The NetBSD Foundation, Inc. @@ -587,13 +587,13 @@ typedef struct } hfs_callbacks; -hfs_callbacks hfs_gcb; /* global callbacks */ +extern hfs_callbacks hfs_gcb; /* global callbacks */ /* * global case folding table * (lazily initialized; see comments at bottom of hfs_open_volume()) */ -unichar_t* hfs_gcft; +extern unichar_t* hfs_gcft; #if 0 #pragma mark - diff --git a/sys/fs/nilfs/nilfs.h b/sys/fs/nilfs/nilfs.h index 7137e9a5553d..0ed897aa2e14 100644 --- a/sys/fs/nilfs/nilfs.h +++ b/sys/fs/nilfs/nilfs.h @@ -1,4 +1,4 @@ -/* $NetBSD: nilfs.h,v 1.2 2011/09/27 01:34:41 christos Exp $ */ +/* $NetBSD: nilfs.h,v 1.3 2012/07/28 00:43:23 matt Exp $ */ /* * Copyright (c) 2008, 2009 Reinoud Zandijk @@ -101,7 +101,7 @@ extern int nilfs_verbose; MALLOC_DECLARE(M_NILFSMNT); MALLOC_DECLARE(M_NILFSTEMP); -struct pool nilfs_node_pool; +extern struct pool nilfs_node_pool; struct nilfs_node; struct nilfs_mount; diff --git a/sys/kern/kgdb_stub.c b/sys/kern/kgdb_stub.c index 628e2e46ed06..bf9d3521e688 100644 --- a/sys/kern/kgdb_stub.c +++ b/sys/kern/kgdb_stub.c @@ -1,4 +1,4 @@ -/* $NetBSD: kgdb_stub.c,v 1.24 2011/04/03 22:29:28 dyoung Exp $ */ +/* $NetBSD: kgdb_stub.c,v 1.25 2012/07/28 00:43:24 matt Exp $ */ /* * Copyright (c) 1990, 1993 @@ -45,8 +45,9 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kgdb_stub.c,v 1.24 2011/04/03 22:29:28 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kgdb_stub.c,v 1.25 2012/07/28 00:43:24 matt Exp $"); +#include "opt_ddb.h" #include "opt_kgdb.h" #include @@ -92,7 +93,11 @@ static kgdb_reg_t gdb_regs[KGDB_NUMREGS]; * cases such as disabling hardware watchdogs while in kgdb. Name * is shared with DDB. */ +#ifdef DDB +extern void (*db_trap_callback)(int); +#else void (*db_trap_callback)(int); +#endif void kgdb_voidop(void); diff --git a/sys/net/if_etherip.c b/sys/net/if_etherip.c index cdf636f625fd..5f99a804b7ed 100644 --- a/sys/net/if_etherip.c +++ b/sys/net/if_etherip.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_etherip.c,v 1.32 2012/06/02 21:36:47 dsl Exp $ */ +/* $NetBSD: if_etherip.c,v 1.33 2012/07/28 00:43:24 matt Exp $ */ /* * Copyright (c) 2006, Hans Rosenfeld @@ -86,7 +86,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_etherip.c,v 1.32 2012/06/02 21:36:47 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_etherip.c,v 1.33 2012/07/28 00:43:24 matt Exp $"); #include "opt_inet.h" @@ -134,6 +134,8 @@ __KERNEL_RCSID(0, "$NetBSD: if_etherip.c,v 1.32 2012/06/02 21:36:47 dsl Exp $"); #include +struct etherip_softc_list etherip_softc_list; + static int etherip_node; static int etherip_sysctl_handler(SYSCTLFN_PROTO); SYSCTL_SETUP_PROTO(sysctl_etherip_setup); diff --git a/sys/net/if_etherip.h b/sys/net/if_etherip.h index b36d188efaab..5f68060a222c 100644 --- a/sys/net/if_etherip.h +++ b/sys/net/if_etherip.h @@ -1,4 +1,4 @@ -/* $NetBSD: if_etherip.h,v 1.10 2008/11/12 12:36:28 ad Exp $ */ +/* $NetBSD: if_etherip.h,v 1.11 2012/07/28 00:43:24 matt Exp $ */ /* * Copyright (c) 2006, Hans Rosenfeld @@ -51,7 +51,8 @@ struct etherip_softc { LIST_ENTRY(etherip_softc) etherip_list; /* list of etherip tunnels */ }; -LIST_HEAD(, etherip_softc) etherip_softc_list; +LIST_HEAD(etherip_softc_list, etherip_softc); +extern struct etherip_softc_list etherip_softc_list; struct etherip_header { uint8_t eip_ver; /* version/reserved */ diff --git a/sys/net/npf/npf_impl.h b/sys/net/npf/npf_impl.h index 6df0bdee2512..c95a8eee24c8 100644 --- a/sys/net/npf/npf_impl.h +++ b/sys/net/npf/npf_impl.h @@ -1,4 +1,4 @@ -/* $NetBSD: npf_impl.h,v 1.19 2012/07/19 21:52:29 spz Exp $ */ +/* $NetBSD: npf_impl.h,v 1.20 2012/07/28 00:43:24 matt Exp $ */ /*- * Copyright (c) 2009-2012 The NetBSD Foundation, Inc. @@ -215,7 +215,7 @@ int npf_match_tcpfl(npf_cache_t *, nbuf_t *, void *, uint32_t); void npf_tableset_sysinit(void); void npf_tableset_sysfini(void); -const pt_tree_ops_t npf_table_ptree_ops; +extern const pt_tree_ops_t npf_table_ptree_ops; npf_tableset_t *npf_tableset_create(void); void npf_tableset_destroy(npf_tableset_t *); diff --git a/sys/netiso/eonvar.h b/sys/netiso/eonvar.h index 59e426f8fad5..eb932facbd9e 100644 --- a/sys/netiso/eonvar.h +++ b/sys/netiso/eonvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: eonvar.h,v 1.18 2008/10/24 17:07:33 dyoung Exp $ */ +/* $NetBSD: eonvar.h,v 1.19 2012/07/28 00:43:24 matt Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -139,7 +139,7 @@ struct eon_iphdr { #define IFF_ES 0x400 #define IFF_IS 0x800 -struct eon_stat { +extern struct eon_stat { int es_in_multi_es; int es_in_multi_is; int es_in_broad; diff --git a/sys/netiso/if_eon.c b/sys/netiso/if_eon.c index 4c3ca8c5fda0..28e339ab68ed 100644 --- a/sys/netiso/if_eon.c +++ b/sys/netiso/if_eon.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_eon.c,v 1.71 2011/07/17 20:54:54 joerg Exp $ */ +/* $NetBSD: if_eon.c,v 1.72 2012/07/28 00:43:24 matt Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -67,7 +67,7 @@ SOFTWARE. */ #include -__KERNEL_RCSID(0, "$NetBSD: if_eon.c,v 1.71 2011/07/17 20:54:54 joerg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_eon.c,v 1.72 2012/07/28 00:43:24 matt Exp $"); #include "opt_eon.h" @@ -117,6 +117,7 @@ eonprotoinit(void) (void) eonattach(); } +struct eon_stat eonstat; struct eon_llinfo eon_llinfo; #define PROBE_OK 0;