isc-dhcp: -fno-common fixes from upstream
This commit is contained in:
parent
7205bfb68f
commit
0390522a9e
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.57 2020/04/06 22:56:29 cwen Exp $
|
||||
# $OpenBSD: Makefile,v 1.58 2021/02/01 22:01:16 sthen Exp $
|
||||
|
||||
COMMENT-main= ISC DHCP Server
|
||||
COMMENT-client= ISC DHCP Client
|
||||
@ -10,6 +10,7 @@ PKGNAME= isc-dhcp-${VERSION:S/-P/./}
|
||||
PKGNAME-main= isc-dhcp-server-${VERSION:S/-P/./}
|
||||
PKGNAME-client= isc-dhcp-client-${VERSION:S/-P/./}
|
||||
PKGNAME-omapi= isc-dhcp-omapi-${VERSION:S/-P/./}
|
||||
REVISION= 0
|
||||
CATEGORIES= net
|
||||
|
||||
DISTFILES= dhcp-${VERSION}.tar.gz
|
||||
|
22
net/isc-dhcp/patches/patch-client_dhclient_c
Normal file
22
net/isc-dhcp/patches/patch-client_dhclient_c
Normal file
@ -0,0 +1,22 @@
|
||||
$OpenBSD: patch-client_dhclient_c,v 1.2 2021/02/01 22:01:16 sthen Exp $
|
||||
|
||||
From 6c7e61578b1b449272dbb40dd8b98d03dad8a57a Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Markwalder <tmark@isc.org>
|
||||
Date: Thu, 30 Jul 2020 10:01:36 -0400
|
||||
Subject: [PATCH] [#117] Fixed gcc 10 compilation issues
|
||||
|
||||
Index: client/dhclient.c
|
||||
--- client/dhclient.c.orig
|
||||
+++ client/dhclient.c
|
||||
@@ -83,8 +83,9 @@ static const char message [] = "Internet Systems Conso
|
||||
static const char url [] = "For info, please visit https://www.isc.org/software/dhcp/";
|
||||
#endif /* UNIT_TEST */
|
||||
|
||||
-u_int16_t local_port = 0;
|
||||
-u_int16_t remote_port = 0;
|
||||
+extern u_int16_t local_port;
|
||||
+extern u_int16_t remote_port;
|
||||
+
|
||||
#if defined(DHCPv6) && defined(DHCP4o6)
|
||||
int dhcp4o6_state = -1; /* -1 = stopped, 0 = polling, 1 = started */
|
||||
#endif
|
21
net/isc-dhcp/patches/patch-common_discover_c
Normal file
21
net/isc-dhcp/patches/patch-common_discover_c
Normal file
@ -0,0 +1,21 @@
|
||||
$OpenBSD: patch-common_discover_c,v 1.1 2021/02/01 22:01:16 sthen Exp $
|
||||
|
||||
From 6c7e61578b1b449272dbb40dd8b98d03dad8a57a Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Markwalder <tmark@isc.org>
|
||||
Date: Thu, 30 Jul 2020 10:01:36 -0400
|
||||
Subject: [PATCH] [#117] Fixed gcc 10 compilation issues
|
||||
|
||||
Index: common/discover.c
|
||||
--- common/discover.c.orig
|
||||
+++ common/discover.c
|
||||
@@ -45,8 +45,8 @@ struct interface_info *fallback_interface = 0;
|
||||
|
||||
int interfaces_invalidated;
|
||||
int quiet_interface_discovery;
|
||||
-u_int16_t local_port;
|
||||
-u_int16_t remote_port;
|
||||
+u_int16_t local_port = 0;
|
||||
+u_int16_t remote_port = 0;
|
||||
u_int16_t relay_port = 0;
|
||||
int dhcpv4_over_dhcpv6 = 0;
|
||||
int (*dhcp_interface_setup_hook) (struct interface_info *, struct iaddr *);
|
@ -1,4 +1,9 @@
|
||||
$OpenBSD: patch-keama_keama_c,v 1.1 2020/01/22 16:11:55 sthen Exp $
|
||||
$OpenBSD: patch-keama_keama_c,v 1.2 2021/02/01 22:01:16 sthen Exp $
|
||||
|
||||
From c666652e10e28558ed7b2b0025bf193478e98030 Mon Sep 17 00:00:00 2001
|
||||
From: Francis Dupont <fdupont@isc.org>
|
||||
Date: Fri, 3 Jul 2020 15:24:32 +0200
|
||||
Subject: [PATCH] Fixed gcc10 build
|
||||
|
||||
Index: keama/keama.c
|
||||
--- keama/keama.c.orig
|
||||
@ -12,3 +17,13 @@ Index: keama/keama.c
|
||||
#include <arpa/inet.h>
|
||||
#include <assert.h>
|
||||
#include <fcntl.h>
|
||||
@@ -46,6 +48,9 @@ usage(const char *sfmt, const char *sarg) {
|
||||
fputs(KEAMA_USAGE, stderr);
|
||||
exit(1);
|
||||
}
|
||||
+
|
||||
+enum resolve resolve;
|
||||
+struct parses parses;
|
||||
|
||||
int local_family = 0;
|
||||
char *hook_library_path = NULL;
|
||||
|
@ -1,9 +1,14 @@
|
||||
$OpenBSD: patch-keama_keama_h,v 1.1 2020/01/22 16:11:55 sthen Exp $
|
||||
$OpenBSD: patch-keama_keama_h,v 1.2 2021/02/01 22:01:16 sthen Exp $
|
||||
|
||||
From c666652e10e28558ed7b2b0025bf193478e98030 Mon Sep 17 00:00:00 2001
|
||||
From: Francis Dupont <fdupont@isc.org>
|
||||
Date: Fri, 3 Jul 2020 15:24:32 +0200
|
||||
Subject: [PATCH] Fixed gcc10 build
|
||||
|
||||
Index: keama/keama.h
|
||||
--- keama/keama.h.orig
|
||||
+++ keama/keama.h
|
||||
@@ -29,6 +29,7 @@
|
||||
@@ -29,14 +29,17 @@
|
||||
#include "dhctoken.h"
|
||||
|
||||
#include <time.h>
|
||||
@ -11,3 +16,32 @@ Index: keama/keama.h
|
||||
|
||||
/* Resolution of FQDNs into IPv4 addresses */
|
||||
enum resolve {
|
||||
perform = 0, /* resolve */
|
||||
fatal, /* raise a fatal error */
|
||||
pass /* pass the string wth a warning */
|
||||
-} resolve;
|
||||
+};
|
||||
|
||||
+extern enum resolve resolve;
|
||||
+
|
||||
/* From includes/dhcp.h */
|
||||
|
||||
#define HTYPE_ETHER 1
|
||||
@@ -58,8 +61,6 @@ extern int local_family;
|
||||
|
||||
/* A parsing context. */
|
||||
|
||||
-TAILQ_HEAD(parses, parse) parses;
|
||||
-
|
||||
struct parse {
|
||||
int lexline;
|
||||
int lexchar;
|
||||
@@ -119,6 +120,8 @@ struct parse {
|
||||
TAILQ_ENTRY(parse) next;
|
||||
|
||||
};
|
||||
+
|
||||
+extern TAILQ_HEAD(parses, parse) parses;
|
||||
|
||||
#define PARAMETER 0
|
||||
#define TOPLEVEL 1
|
||||
|
21
net/isc-dhcp/patches/patch-relay_dhcrelay_c
Normal file
21
net/isc-dhcp/patches/patch-relay_dhcrelay_c
Normal file
@ -0,0 +1,21 @@
|
||||
$OpenBSD: patch-relay_dhcrelay_c,v 1.1 2021/02/01 22:01:16 sthen Exp $
|
||||
|
||||
From 6c7e61578b1b449272dbb40dd8b98d03dad8a57a Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Markwalder <tmark@isc.org>
|
||||
Date: Thu, 30 Jul 2020 10:01:36 -0400
|
||||
Subject: [PATCH] [#117] Fixed gcc 10 compilation issues
|
||||
|
||||
Index: relay/dhcrelay.c
|
||||
--- relay/dhcrelay.c.orig
|
||||
+++ relay/dhcrelay.c
|
||||
@@ -95,8 +95,8 @@ enum { forward_and_append, /* Forward and append our o
|
||||
forward_untouched, /* Forward without changes. */
|
||||
discard } agent_relay_mode = forward_and_replace;
|
||||
|
||||
-u_int16_t local_port;
|
||||
-u_int16_t remote_port;
|
||||
+extern u_int16_t local_port;
|
||||
+extern u_int16_t remote_port;
|
||||
|
||||
/* Relay agent server list. */
|
||||
struct server_list {
|
19
net/isc-dhcp/patches/patch-server_mdb6_c
Normal file
19
net/isc-dhcp/patches/patch-server_mdb6_c
Normal file
@ -0,0 +1,19 @@
|
||||
$OpenBSD: patch-server_mdb6_c,v 1.1 2021/02/01 22:01:16 sthen Exp $
|
||||
|
||||
From 6c7e61578b1b449272dbb40dd8b98d03dad8a57a Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Markwalder <tmark@isc.org>
|
||||
Date: Thu, 30 Jul 2020 10:01:36 -0400
|
||||
Subject: [PATCH] [#117] Fixed gcc 10 compilation issues
|
||||
|
||||
Index: server/mdb6.c
|
||||
--- server/mdb6.c.orig
|
||||
+++ server/mdb6.c
|
||||
@@ -1945,7 +1945,7 @@ create_prefix6(struct ipv6_pool *pool, struct iasubopt
|
||||
}
|
||||
new_ds.data = new_ds.buffer->data;
|
||||
memcpy(new_ds.buffer->data, ds.data, ds.len);
|
||||
- memcpy(new_ds.buffer->data + ds.len, &tmp, sizeof(tmp));
|
||||
+ memcpy(&new_ds.buffer->data[0] + ds.len, &tmp, sizeof(tmp));
|
||||
data_string_forget(&ds, MDL);
|
||||
data_string_copy(&ds, &new_ds, MDL);
|
||||
data_string_forget(&new_ds, MDL);
|
19
net/isc-dhcp/patches/patch-server_mdb_c
Normal file
19
net/isc-dhcp/patches/patch-server_mdb_c
Normal file
@ -0,0 +1,19 @@
|
||||
$OpenBSD: patch-server_mdb_c,v 1.1 2021/02/01 22:01:16 sthen Exp $
|
||||
|
||||
From 6c7e61578b1b449272dbb40dd8b98d03dad8a57a Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Markwalder <tmark@isc.org>
|
||||
Date: Thu, 30 Jul 2020 10:01:36 -0400
|
||||
Subject: [PATCH] [#117] Fixed gcc 10 compilation issues
|
||||
|
||||
Index: server/mdb.c
|
||||
--- server/mdb.c.orig
|
||||
+++ server/mdb.c
|
||||
@@ -67,7 +67,7 @@ static host_id_info_t *host_id_info = NULL;
|
||||
|
||||
int numclasseswritten;
|
||||
|
||||
-omapi_object_type_t *dhcp_type_host;
|
||||
+extern omapi_object_type_t *dhcp_type_host;
|
||||
|
||||
isc_result_t enter_class(cd, dynamicp, commit)
|
||||
struct class *cd;
|
Loading…
Reference in New Issue
Block a user