Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/ldpd Avoid common symbol definitions



details:   https://anonhg.NetBSD.org/src/rev/b1fa6e075a45
branches:  trunk
changeset: 971374:b1fa6e075a45
user:      joerg <joerg%NetBSD.org@localhost>
date:      Wed Apr 22 23:53:27 2020 +0000

description:
Avoid common symbol definitions

diffstat:

 usr.sbin/ldpd/conffile.c  |  5 ++++-
 usr.sbin/ldpd/conffile.h  |  6 +++---
 usr.sbin/ldpd/ldp_peer.c  |  3 ++-
 usr.sbin/ldpd/ldp_peer.h  |  4 ++--
 usr.sbin/ldpd/socketops.c |  5 ++++-
 usr.sbin/ldpd/socketops.h |  5 ++---
 6 files changed, 17 insertions(+), 11 deletions(-)

diffs (123 lines):

diff -r f3e5891eff94 -r b1fa6e075a45 usr.sbin/ldpd/conffile.c
--- a/usr.sbin/ldpd/conffile.c  Wed Apr 22 23:51:34 2020 +0000
+++ b/usr.sbin/ldpd/conffile.c  Wed Apr 22 23:53:27 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: conffile.c,v 1.12 2017/01/10 21:02:38 christos Exp $ */
+/* $NetBSD: conffile.c,v 1.13 2020/04/22 23:53:27 joerg Exp $ */
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -47,6 +47,9 @@
 #define NextCommand(x) strsep(&x, " ")
 #define LINEMAXSIZE 1024
 
+struct coifs_head coifs_head;
+struct conei_head conei_head;
+
 char *mapped, *nextline;
 size_t mapsize;
 
diff -r f3e5891eff94 -r b1fa6e075a45 usr.sbin/ldpd/conffile.h
--- a/usr.sbin/ldpd/conffile.h  Wed Apr 22 23:51:34 2020 +0000
+++ b/usr.sbin/ldpd/conffile.h  Wed Apr 22 23:53:27 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: conffile.h,v 1.4 2013/10/17 18:10:23 kefren Exp $ */
+/* $NetBSD: conffile.h,v 1.5 2020/04/22 23:53:27 joerg Exp $ */
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -49,7 +49,7 @@
        int authenticate;       /* RFC 2385 */
        SLIST_ENTRY(conf_neighbour) neilist;
 };
-SLIST_HEAD(,conf_neighbour) conei_head;
+extern SLIST_HEAD(conei_head,conf_neighbour) conei_head;
 
 struct conf_interface {
        char if_name[IF_NAMESIZE];
@@ -57,7 +57,7 @@
        int passive;
        SLIST_ENTRY(conf_interface) iflist;
 };
-SLIST_HEAD(,conf_interface) coifs_head;
+extern SLIST_HEAD(coifs_head,conf_interface) coifs_head;
 
 int conf_parsefile(const char *fname);
 
diff -r f3e5891eff94 -r b1fa6e075a45 usr.sbin/ldpd/ldp_peer.c
--- a/usr.sbin/ldpd/ldp_peer.c  Wed Apr 22 23:51:34 2020 +0000
+++ b/usr.sbin/ldpd/ldp_peer.c  Wed Apr 22 23:53:27 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ldp_peer.c,v 1.16 2013/08/02 07:29:56 kefren Exp $ */
+/* $NetBSD: ldp_peer.c,v 1.17 2020/04/22 23:53:27 joerg Exp $ */
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -55,6 +55,7 @@
 #include "ldp_peer.h"
 
 extern int ldp_holddown_time;
+struct ldp_peer_head ldp_peer_head;
 
 static struct label_mapping *ldp_peer_get_lm(struct ldp_peer *,
     const struct sockaddr *, uint);
diff -r f3e5891eff94 -r b1fa6e075a45 usr.sbin/ldpd/ldp_peer.h
--- a/usr.sbin/ldpd/ldp_peer.h  Wed Apr 22 23:51:34 2020 +0000
+++ b/usr.sbin/ldpd/ldp_peer.h  Wed Apr 22 23:53:27 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ldp_peer.h,v 1.8 2013/08/02 07:29:56 kefren Exp $ */
+/* $NetBSD: ldp_peer.h,v 1.9 2020/04/22 23:53:27 joerg Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -74,7 +74,7 @@
 
        SLIST_ENTRY(ldp_peer) peers;
 };
-SLIST_HEAD(,ldp_peer) ldp_peer_head;
+extern SLIST_HEAD(ldp_peer_head,ldp_peer) ldp_peer_head;
 
 struct peer_map {
        struct ldp_peer *peer;
diff -r f3e5891eff94 -r b1fa6e075a45 usr.sbin/ldpd/socketops.c
--- a/usr.sbin/ldpd/socketops.c Wed Apr 22 23:51:34 2020 +0000
+++ b/usr.sbin/ldpd/socketops.c Wed Apr 22 23:53:27 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: socketops.c,v 1.34 2017/04/12 17:02:51 roy Exp $ */
+/* $NetBSD: socketops.c,v 1.35 2020/04/22 23:53:27 joerg Exp $ */
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -61,6 +61,9 @@
 #include "ldp_errors.h"
 #include "socketops.h"
 
+struct hello_info_head hello_info_head;
+static SLIST_HEAD(,hello_socket) hello_socket_head;
+
 int ls;                                /* TCP listening socket on port 646 */
 int route_socket;              /* used to see when a route is added/deleted */
 int command_socket;            /* Listening socket for interface command */
diff -r f3e5891eff94 -r b1fa6e075a45 usr.sbin/ldpd/socketops.h
--- a/usr.sbin/ldpd/socketops.h Wed Apr 22 23:51:34 2020 +0000
+++ b/usr.sbin/ldpd/socketops.h Wed Apr 22 23:53:27 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: socketops.h,v 1.6 2013/07/11 05:45:23 kefren Exp $ */
+/* $NetBSD: socketops.h,v 1.7 2020/04/22 23:53:27 joerg Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -62,12 +62,11 @@
        int keepalive;
        SLIST_ENTRY(hello_info) infos;
 };
-SLIST_HEAD(,hello_info) hello_info_head;
+extern SLIST_HEAD(hello_info_head,hello_info) hello_info_head;
 
 struct hello_socket {
        int type, socket;
        SLIST_ENTRY(hello_socket) listentry;
 };
-SLIST_HEAD(,hello_socket) hello_socket_head;
 
 #endif /* !_SOCKETOPS_H_ */



Home | Main Index | Thread Index | Old Index