From f9cb35bcb40fd9a2a553469242189871fd558f87 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Tue, 31 Mar 2020 20:19:47 +0000 Subject: Fix build with -fno-common which will be the default in gcc-10. * acpi/acpifs.h (fs, acpifs_maptime): Add extern qualifier. * boot/private.h (verbose): Likewise. * eth-multiplexer/netfs_impl.h (multiplexer_maptime): Likewise. * eth-multiplexer/vdev.h (port_bucket, vdev_portclass): Likewise. * exec/priv.h (port_bucket, execboot_portclass): Likewise. * ext2fs/ext2fs.h (sblock, sblock_dirty, block_size, log2_block_size, log2_dev_blocks_per_fs_block, log2_stat_blocks_per_fs_block, zeroblock, frag_size, frags_per_block, inodes_per_block, itb_per_group, db_per_group, desc_per_block, addr_per_block, groups_count, node_to_page_lock, generation_lock, next_generation, group_desc_image, global_pokel, modified_global_blocks, use_xattr_translator_records): Likewise. * hostmux/hostmux.h (hostmux_maptime): Likewise. * isofs/isofs.h (host_name, mounted_on, disk_image, disk_image_len, logical_block_size, sblock): Likewise. * libdiskfs/diskfs.h (diskfs_shortcut_symlink, diskfs_shortcut_chrdev, diskfs_shortcut_blkdev, diskfs_shortcut_fifo, diskfs_shortcut_ifsock, diskfs_create_symlink_hook, diskfs_read_symlink_hook): Likewise. * libnetfs/callbacks.h (_netfs_translator_callback1, _netfs_translator_callback2): Likewise. * libnetfs/priv.h (netfs_mtime): Likewise. * libpager/priv.h (_pager_class): Likewise. * libtrivfs/trivfs.h (trivfs_check_access_hook, trivfs_check_open_hook, trivfs_open_hook, trivfs_protid_create_hook, trivfs_peropen_create_hook, trivfs_protid_destroy_hook, trivfs_peropen_destroy_hook, trivfs_getroot_hook): Likewise. * lwip/lwip-hurd.h (lwip_bucket, socketport_class, addrport_class, shutdown_notify_class, lwip_protid_portclasses, lwip_cntl_portclasses, lwip_bootstrap_portclass, fsys_identity, lwipcntl, lwip_owner, lwip_group): Likewise. * lwip/port/include/netif/hurdtunif.h (tunnel_cntlclass, tunnel_class): Likewise. * nfs/nfs.h (main_udp_socket, hostname, mapped_time): Likewise. * nfsd/nfsd.h (mapped_time, authserver): Likewise. * pci-arbiter/pcifs.h (fs, pcifs_maptime): Likewise. * pci-arbiter/startup.h (pci_shutdown_notify_class, arrange_shutdown_notification): Likewise. * pfinet/pfinet.h (pfinet_bucket, addrport_class, socketport_class, fsys_identity, pfinetctl, pfinet_owner, pfinet_group): Likewise. * pflocal/sserver.h (sock_port_bucket): Likewise. * proc/proc.h (authserver, self_proc, init_proc, startup_proc, proc_bucket, proc_class, generic_port_class, exc_class, generic_port, kernel_proc, global_lock): Likewise. * term/term.h (termstate, termflags, global_lock, carrier_alert, select_alert, pty_select_alert, term_bucket, tty_cntl_class, tty_class, cttyid_class, pty_class, pty_cntl_class, termctl, ptyctl, inputq, rawq, outputq, remote_input_mode, external_processing, term_owner, term_group, term_mode, bottom): Likewise. * usermux/usermux.h (usermux_maptime): Likewise. * utils/msgids.h (msgid_argp): Likewise. * libdiskfs/priv.h (_diskfs_mtime): Remove definition. * lwip/options.h (lwip_argp): Add prototype. * mach-defpager/priv.h (partitions): Name structure. (all_partitions): Add extern qualifier. * acpi/main.c (acpifs_maptime, fs): New variables. * exec/main.c (port_bucket, execboot_portclass): Likewise. * ext2fs/ext2fs.c (sblock, sblock_dirty, block_size, log2_block_size, log2_dev_blocks_per_fs_block, log2_stat_blocks_per_fs_block, frag_size, frags_per_block, inodes_per_block, itb_per_group, db_per_group, desc_per_block, addr_per_block, groups_count, next_generation, group_desc_image, global_pokel, use_xattr_translator_records): Likewise. * isofs/main.c (host_name, mounted_on, logical_block_size, sblock): Likewise. * libpager/pager-create.c (_pager_class): Likewise. * lwip/port/netif/hurdtunif.c (tunnel_cntlclass, tunnel_class): Likewise. * mach-defpager/default_pager.c (all_partitions): Likewise. * nfs/main.c (main_udp_socket, hostname, mapped_time): Likewise. * nfsd/main.c (mapped_time, authserver): Likewise. * pci-arbiter/main.c (fs, pcifs_maptime): Likewise. * pci-arbiter/startup.c (*pci_shutdown_notify_class): Likewise. * pfinet/main.c (pfinetctl, pfinet_owner, pfinet_group, pfinet_bucket, addrport_class, socketport_class, fsys_identity): Likewise. * proc/main.c (authserver, self_proc, init_proc, startup_proc, proc_bucket, proc_class, generic_port_class, exc_class, generic_port, kernel_proc, global_lock): Likewise. * term/main.c (termstate, termflags, global_lock, carrier_alert, select_alert, pty_select_alert, term_bucket, tty_cntl_class, tty_class, cttyid_class, pty_class, pty_cntl_class, termctl, ptyctl, outputq, remote_input_mode, external_processing, term_owner, term_group, term_mode, bottom): Likewise. * usermux/usermux.c (usermux_mapped_time): Rename to usermux_maptime. * lwip/main.c: Include "options.h". (lwip_argp, netif_list): Remove declarations. (lwip_bucket, socketport_class, addrport_class, shutdown_notify_class, lwip_cntl_portclasses, lwip_bootstrap_portclass, lwip_owner, lwip_group, fsys_identity, lwipcntl): New variables. * eth-multiplexer/multiplexer.c (multiplexer_maptime): Add variable. * hostmux/hostmux.c (hostmux_mapped_time): Rename variable to hostmux_maptime * libdiskfs/extra-version.c: Rename file to... * libdiskfs/priv.c: ... new file. (diskfs_shortcut_symlink, diskfs_shortcut_chrdev, diskfs_shortcut_blkdev, diskfs_shortcut_fifo, diskfs_shortcut_ifsock, diskfs_create_symlink_hook, diskfs_read_symlink_hook): Add weak variables. * libdiskfs/Makefile (OTHERSRCS): Replace extra-version.c with priv.c. * libtrivfs/priv.c: New file. * libtrivfs/Makefile (OTHERSRCS): Add priv.c * libcons/extra-version.c: Rename file to... * libcons/priv.c: ... new file. * libcons/Makefile (SRCS): Replace extra-version.c with priv.c. Fix build with # --- lwip/lwip-hurd.h | 22 +++++++++++----------- lwip/main.c | 20 +++++++++++++++++--- lwip/options.h | 2 ++ lwip/port/include/netif/hurdtunif.h | 4 ++-- lwip/port/netif/hurdtunif.c | 3 +++ 5 files changed, 35 insertions(+), 16 deletions(-) (limited to 'lwip') diff --git a/lwip/lwip-hurd.h b/lwip/lwip-hurd.h index 9e05550b..ab722618 100644 --- a/lwip/lwip-hurd.h +++ b/lwip/lwip-hurd.h @@ -30,21 +30,21 @@ #include #include -struct port_bucket *lwip_bucket; -struct port_class *socketport_class; -struct port_class *addrport_class; -struct port_class *shutdown_notify_class; +extern struct port_bucket *lwip_bucket; +extern struct port_class *socketport_class; +extern struct port_class *addrport_class; +extern struct port_class *shutdown_notify_class; -struct port_class *lwip_protid_portclasses[2]; -struct port_class *lwip_cntl_portclasses[2]; +extern struct port_class *lwip_protid_portclasses[2]; +extern struct port_class *lwip_cntl_portclasses[2]; /* Which portclass to install on the bootstrap port, default to IPv4. */ -int lwip_bootstrap_portclass; +extern int lwip_bootstrap_portclass; -mach_port_t fsys_identity; +extern mach_port_t fsys_identity; /* Trivfs control structure for lwip. */ -struct trivfs_control *lwipcntl; +extern struct trivfs_control *lwipcntl; /* Address family port classes. */ enum @@ -80,10 +80,10 @@ struct sock_addr }; /* Owner of the underlying node. */ -uid_t lwip_owner; +extern uid_t lwip_owner; /* Group of the underlying node. */ -uid_t lwip_group; +extern uid_t lwip_group; struct socket *sock_alloc (void); void sock_release (struct socket *); diff --git a/lwip/main.c b/lwip/main.c index 4dfbe143..373f3935 100644 --- a/lwip/main.c +++ b/lwip/main.c @@ -37,13 +37,27 @@ #include #include -#include +#include "startup.h" +#include "options.h" /* Translator initialization */ -extern struct argp lwip_argp; +struct port_bucket *lwip_bucket; +struct port_class *socketport_class; +struct port_class *addrport_class; +struct port_class *shutdown_notify_class; -extern struct netif *netif_list; +struct port_class *lwip_protid_portclasses[2]; +struct port_class *lwip_cntl_portclasses[2]; + +int lwip_bootstrap_portclass; + +uid_t lwip_owner; +uid_t lwip_group; + +mach_port_t fsys_identity; + +struct trivfs_control *lwipcntl; int trivfs_fstype = FSTYPE_MISC; int trivfs_fsid = 0; diff --git a/lwip/options.h b/lwip/options.h index e370fab0..7d1c96c7 100644 --- a/lwip/options.h +++ b/lwip/options.h @@ -78,4 +78,6 @@ static const char doc[] = "Interface-specific options before the first \ interface specification apply to the first following interface; otherwise \ they apply to the previously specified interface."; +extern struct argp lwip_argp; + #endif // OPTIONS_H diff --git a/lwip/port/include/netif/hurdtunif.h b/lwip/port/include/netif/hurdtunif.h index 65e34ac3..43d55348 100644 --- a/lwip/port/include/netif/hurdtunif.h +++ b/lwip/port/include/netif/hurdtunif.h @@ -53,8 +53,8 @@ struct hurdtunif uint8_t read_blocked; }; -struct port_class *tunnel_cntlclass; -struct port_class *tunnel_class; +extern struct port_class *tunnel_cntlclass; +extern struct port_class *tunnel_class; /* Device initialization */ err_t hurdtunif_device_init (struct netif *netif); diff --git a/lwip/port/netif/hurdtunif.c b/lwip/port/netif/hurdtunif.c index 728db9ac..6e3676c7 100644 --- a/lwip/port/netif/hurdtunif.c +++ b/lwip/port/netif/hurdtunif.c @@ -34,6 +34,9 @@ #include +struct port_class *tunnel_cntlclass; +struct port_class *tunnel_class; + /* Add to the end of the queue */ static void enqueue (struct pbufqueue *q, struct pbuf *p) -- cgit v1.2.3