Back out last night's attempt to fix the client build on 4.x, and commit

a better solution submitted by the maintainer.
This commit is contained in:
Dag-Erling Smørgrav 2004-03-22 23:33:09 +00:00
parent e68206fade
commit dfb52e90db
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=104990
28 changed files with 72 additions and 76 deletions

View file

@ -8,7 +8,7 @@
PORTNAME= dhcp PORTNAME= dhcp
PORTVERSION= 3.0.1.r12 PORTVERSION= 3.0.1.r12
PORTREVISION= 1 PORTREVISION= 2
CATEGORIES= net CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_ISC} MASTER_SITES= ${MASTER_SITE_ISC}
MASTER_SITE_SUBDIR= dhcp dhcp/dhcp-3.0-history MASTER_SITE_SUBDIR= dhcp dhcp/dhcp-3.0-history
@ -35,16 +35,6 @@ INSTALL_TARGET= install.${SUBSYS}
SUBSYS?= server SUBSYS?= server
.if ${SUBSYS} == client .if ${SUBSYS} == client
.if ${OSVERSION} >= 502000
# Include 802.11 patches
EXTRA_PATCHES= ${PATCHDIR}/extra-patch-client::clparse.c \
${PATCHDIR}/extra-patch-client::dhclient.8 \
${PATCHDIR}/extra-patch-client::dhclient.c \
${PATCHDIR}/extra-patch-client::dhclient.conf
.else
# 4.x doesn't support interface polling
WITHOUT_INTERFACE_POLLING= Unsupported
.endif
MAN5= dhclient.conf.5 dhclient.leases.5 MAN5= dhclient.conf.5 dhclient.leases.5
MAN8= dhclient.8 dhclient-script.8 MAN8= dhclient.8 dhclient-script.8
.elif ${SUBSYS} == server .elif ${SUBSYS} == server

View file

@ -6,7 +6,7 @@
.\" .\"
+.\" Portions copyright (c) 2000 David E. O'Brien. +.\" Portions copyright (c) 2000 David E. O'Brien.
+.\" All rights reserved. +.\" All rights reserved.
+.\" $FreeBSD: /tmp/pcvs/ports/net/isc-dhcp3-server/files/Attic/extra-patch-client::dhclient.8,v 1.1 2004-03-22 00:41:59 des Exp $ +.\" $FreeBSD$
+.\" +.\"
.TH dhclient 8 .TH dhclient 8
.SH NAME .SH NAME

View file

@ -4,7 +4,7 @@
#include "dhcpd.h" #include "dhcpd.h"
#include "version.h" #include "version.h"
+#ifdef __FreeBSD__ +#if __FreeBSD_version > 502010
+#include <sys/ioctl.h> +#include <sys/ioctl.h>
+#include <net/if_media.h> +#include <net/if_media.h>
+#include <net80211/ieee80211_ioctl.h> +#include <net80211/ieee80211_ioctl.h>
@ -63,7 +63,7 @@
argv [i], (long)strlen (argv [i])); argv [i], (long)strlen (argv [i]));
- strcpy (tmp -> name, argv [i]); - strcpy (tmp -> name, argv [i]);
+ strlcpy (tmp -> name, argv [i], IFNAMSIZ); + strlcpy (tmp -> name, argv [i], IFNAMSIZ);
+#ifdef __FreeBSD__ +#if __FreeBSD_version > 502010
+ set_ieee80211 (tmp); + set_ieee80211 (tmp);
+#endif +#endif
+ /* Init some interface vars, enable polling */ + /* Init some interface vars, enable polling */
@ -79,7 +79,7 @@
INTERFACE_AUTOMATIC)) != INTERFACE_AUTOMATIC)) !=
INTERFACE_REQUESTED)) INTERFACE_REQUESTED))
continue; continue;
+#ifdef __FreeBSD__ +#if __FreeBSD_version > 502010
+ set_ieee80211 (ip); + set_ieee80211 (ip);
+#endif +#endif
+#ifdef ENABLE_POLLING_MODE +#ifdef ENABLE_POLLING_MODE
@ -285,7 +285,7 @@
+/* Check to see if there's a wire plugged in */ +/* Check to see if there's a wire plugged in */
+int +int
+interface_active(struct interface_info *ip) { +interface_active(struct interface_info *ip) {
+#ifdef __FreeBSD__ +#if __FreeBSD_version > 502010
+ struct ifmediareq ifmr; + struct ifmediareq ifmr;
+ int *media_list, i; + int *media_list, i;
+ char *ifname; + char *ifname;
@ -350,7 +350,7 @@
+ return (HAVELINK); + return (HAVELINK);
+} +}
+ +
+#ifdef __FreeBSD__ +#if __FreeBSD_version > 502010
+void +void
+set_ieee80211 (struct interface_info *ip) { +set_ieee80211 (struct interface_info *ip) {
+ +
@ -385,7 +385,7 @@
+ } + }
+ close (sock); + close (sock);
+ } + }
+#endif /* __FreeBSD__ */ +#endif /* __FreeBSD_version */
+ +
+#ifdef ENABLE_POLLING_MODE +#ifdef ENABLE_POLLING_MODE
+/* Go to background after some time */ +/* Go to background after some time */

View file

@ -1,5 +1,14 @@
--- includes/cf/freebsd.h.orig Wed Mar 3 02:32:39 2004 --- includes/cf/freebsd.h.orig Wed Mar 3 02:32:39 2004
+++ includes/cf/freebsd.h Wed Mar 3 02:31:56 2004 +++ includes/cf/freebsd.h Wed Mar 3 02:31:56 2004
@@ -42,7 +42,7 @@
*/
#include <syslog.h>
-#include <sys/types.h>
+#include <sys/param.h>
#include <string.h>
#include <paths.h>
#include <errno.h>
@@ -101,6 +101,10 @@ @@ -101,6 +101,10 @@
#define SOCKLEN_T int #define SOCKLEN_T int
#endif #endif

View file

@ -47,7 +47,7 @@
void state_stop PROTO ((void *)); void state_stop PROTO ((void *));
void state_panic PROTO ((void *)); void state_panic PROTO ((void *));
+ +
+#ifdef __FreeBSD__ +#if __FreeBSD_version > 502010
+void set_ieee80211 PROTO ((struct interface_info *)); +void set_ieee80211 PROTO ((struct interface_info *));
+#endif +#endif
+int interface_active PROTO ((struct interface_info *)); +int interface_active PROTO ((struct interface_info *));

View file

@ -8,7 +8,7 @@
PORTNAME= dhcp PORTNAME= dhcp
PORTVERSION= 3.0.1.r12 PORTVERSION= 3.0.1.r12
PORTREVISION= 1 PORTREVISION= 2
CATEGORIES= net CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_ISC} MASTER_SITES= ${MASTER_SITE_ISC}
MASTER_SITE_SUBDIR= dhcp dhcp/dhcp-3.0-history MASTER_SITE_SUBDIR= dhcp dhcp/dhcp-3.0-history
@ -35,16 +35,6 @@ INSTALL_TARGET= install.${SUBSYS}
SUBSYS?= server SUBSYS?= server
.if ${SUBSYS} == client .if ${SUBSYS} == client
.if ${OSVERSION} >= 502000
# Include 802.11 patches
EXTRA_PATCHES= ${PATCHDIR}/extra-patch-client::clparse.c \
${PATCHDIR}/extra-patch-client::dhclient.8 \
${PATCHDIR}/extra-patch-client::dhclient.c \
${PATCHDIR}/extra-patch-client::dhclient.conf
.else
# 4.x doesn't support interface polling
WITHOUT_INTERFACE_POLLING= Unsupported
.endif
MAN5= dhclient.conf.5 dhclient.leases.5 MAN5= dhclient.conf.5 dhclient.leases.5
MAN8= dhclient.8 dhclient-script.8 MAN8= dhclient.8 dhclient-script.8
.elif ${SUBSYS} == server .elif ${SUBSYS} == server

View file

@ -6,7 +6,7 @@
.\" .\"
+.\" Portions copyright (c) 2000 David E. O'Brien. +.\" Portions copyright (c) 2000 David E. O'Brien.
+.\" All rights reserved. +.\" All rights reserved.
+.\" $FreeBSD: /tmp/pcvs/ports/net/isc-dhcp30-server/files/Attic/extra-patch-client::dhclient.8,v 1.1 2004-03-22 00:41:59 des Exp $ +.\" $FreeBSD$
+.\" +.\"
.TH dhclient 8 .TH dhclient 8
.SH NAME .SH NAME

View file

@ -4,7 +4,7 @@
#include "dhcpd.h" #include "dhcpd.h"
#include "version.h" #include "version.h"
+#ifdef __FreeBSD__ +#if __FreeBSD_version > 502010
+#include <sys/ioctl.h> +#include <sys/ioctl.h>
+#include <net/if_media.h> +#include <net/if_media.h>
+#include <net80211/ieee80211_ioctl.h> +#include <net80211/ieee80211_ioctl.h>
@ -63,7 +63,7 @@
argv [i], (long)strlen (argv [i])); argv [i], (long)strlen (argv [i]));
- strcpy (tmp -> name, argv [i]); - strcpy (tmp -> name, argv [i]);
+ strlcpy (tmp -> name, argv [i], IFNAMSIZ); + strlcpy (tmp -> name, argv [i], IFNAMSIZ);
+#ifdef __FreeBSD__ +#if __FreeBSD_version > 502010
+ set_ieee80211 (tmp); + set_ieee80211 (tmp);
+#endif +#endif
+ /* Init some interface vars, enable polling */ + /* Init some interface vars, enable polling */
@ -79,7 +79,7 @@
INTERFACE_AUTOMATIC)) != INTERFACE_AUTOMATIC)) !=
INTERFACE_REQUESTED)) INTERFACE_REQUESTED))
continue; continue;
+#ifdef __FreeBSD__ +#if __FreeBSD_version > 502010
+ set_ieee80211 (ip); + set_ieee80211 (ip);
+#endif +#endif
+#ifdef ENABLE_POLLING_MODE +#ifdef ENABLE_POLLING_MODE
@ -285,7 +285,7 @@
+/* Check to see if there's a wire plugged in */ +/* Check to see if there's a wire plugged in */
+int +int
+interface_active(struct interface_info *ip) { +interface_active(struct interface_info *ip) {
+#ifdef __FreeBSD__ +#if __FreeBSD_version > 502010
+ struct ifmediareq ifmr; + struct ifmediareq ifmr;
+ int *media_list, i; + int *media_list, i;
+ char *ifname; + char *ifname;
@ -350,7 +350,7 @@
+ return (HAVELINK); + return (HAVELINK);
+} +}
+ +
+#ifdef __FreeBSD__ +#if __FreeBSD_version > 502010
+void +void
+set_ieee80211 (struct interface_info *ip) { +set_ieee80211 (struct interface_info *ip) {
+ +
@ -385,7 +385,7 @@
+ } + }
+ close (sock); + close (sock);
+ } + }
+#endif /* __FreeBSD__ */ +#endif /* __FreeBSD_version */
+ +
+#ifdef ENABLE_POLLING_MODE +#ifdef ENABLE_POLLING_MODE
+/* Go to background after some time */ +/* Go to background after some time */

View file

@ -1,5 +1,14 @@
--- includes/cf/freebsd.h.orig Wed Mar 3 02:32:39 2004 --- includes/cf/freebsd.h.orig Wed Mar 3 02:32:39 2004
+++ includes/cf/freebsd.h Wed Mar 3 02:31:56 2004 +++ includes/cf/freebsd.h Wed Mar 3 02:31:56 2004
@@ -42,7 +42,7 @@
*/
#include <syslog.h>
-#include <sys/types.h>
+#include <sys/param.h>
#include <string.h>
#include <paths.h>
#include <errno.h>
@@ -101,6 +101,10 @@ @@ -101,6 +101,10 @@
#define SOCKLEN_T int #define SOCKLEN_T int
#endif #endif

View file

@ -47,7 +47,7 @@
void state_stop PROTO ((void *)); void state_stop PROTO ((void *));
void state_panic PROTO ((void *)); void state_panic PROTO ((void *));
+ +
+#ifdef __FreeBSD__ +#if __FreeBSD_version > 502010
+void set_ieee80211 PROTO ((struct interface_info *)); +void set_ieee80211 PROTO ((struct interface_info *));
+#endif +#endif
+int interface_active PROTO ((struct interface_info *)); +int interface_active PROTO ((struct interface_info *));

View file

@ -8,7 +8,7 @@
PORTNAME= dhcp PORTNAME= dhcp
PORTVERSION= 3.0.1.r12 PORTVERSION= 3.0.1.r12
PORTREVISION= 1 PORTREVISION= 2
CATEGORIES= net CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_ISC} MASTER_SITES= ${MASTER_SITE_ISC}
MASTER_SITE_SUBDIR= dhcp dhcp/dhcp-3.0-history MASTER_SITE_SUBDIR= dhcp dhcp/dhcp-3.0-history
@ -35,16 +35,6 @@ INSTALL_TARGET= install.${SUBSYS}
SUBSYS?= server SUBSYS?= server
.if ${SUBSYS} == client .if ${SUBSYS} == client
.if ${OSVERSION} >= 502000
# Include 802.11 patches
EXTRA_PATCHES= ${PATCHDIR}/extra-patch-client::clparse.c \
${PATCHDIR}/extra-patch-client::dhclient.8 \
${PATCHDIR}/extra-patch-client::dhclient.c \
${PATCHDIR}/extra-patch-client::dhclient.conf
.else
# 4.x doesn't support interface polling
WITHOUT_INTERFACE_POLLING= Unsupported
.endif
MAN5= dhclient.conf.5 dhclient.leases.5 MAN5= dhclient.conf.5 dhclient.leases.5
MAN8= dhclient.8 dhclient-script.8 MAN8= dhclient.8 dhclient-script.8
.elif ${SUBSYS} == server .elif ${SUBSYS} == server

View file

@ -6,7 +6,7 @@
.\" .\"
+.\" Portions copyright (c) 2000 David E. O'Brien. +.\" Portions copyright (c) 2000 David E. O'Brien.
+.\" All rights reserved. +.\" All rights reserved.
+.\" $FreeBSD: /tmp/pcvs/ports/net/isc-dhcp31-server/files/Attic/extra-patch-client::dhclient.8,v 1.1 2004-03-22 00:41:59 des Exp $ +.\" $FreeBSD$
+.\" +.\"
.TH dhclient 8 .TH dhclient 8
.SH NAME .SH NAME

View file

@ -4,7 +4,7 @@
#include "dhcpd.h" #include "dhcpd.h"
#include "version.h" #include "version.h"
+#ifdef __FreeBSD__ +#if __FreeBSD_version > 502010
+#include <sys/ioctl.h> +#include <sys/ioctl.h>
+#include <net/if_media.h> +#include <net/if_media.h>
+#include <net80211/ieee80211_ioctl.h> +#include <net80211/ieee80211_ioctl.h>
@ -63,7 +63,7 @@
argv [i], (long)strlen (argv [i])); argv [i], (long)strlen (argv [i]));
- strcpy (tmp -> name, argv [i]); - strcpy (tmp -> name, argv [i]);
+ strlcpy (tmp -> name, argv [i], IFNAMSIZ); + strlcpy (tmp -> name, argv [i], IFNAMSIZ);
+#ifdef __FreeBSD__ +#if __FreeBSD_version > 502010
+ set_ieee80211 (tmp); + set_ieee80211 (tmp);
+#endif +#endif
+ /* Init some interface vars, enable polling */ + /* Init some interface vars, enable polling */
@ -79,7 +79,7 @@
INTERFACE_AUTOMATIC)) != INTERFACE_AUTOMATIC)) !=
INTERFACE_REQUESTED)) INTERFACE_REQUESTED))
continue; continue;
+#ifdef __FreeBSD__ +#if __FreeBSD_version > 502010
+ set_ieee80211 (ip); + set_ieee80211 (ip);
+#endif +#endif
+#ifdef ENABLE_POLLING_MODE +#ifdef ENABLE_POLLING_MODE
@ -285,7 +285,7 @@
+/* Check to see if there's a wire plugged in */ +/* Check to see if there's a wire plugged in */
+int +int
+interface_active(struct interface_info *ip) { +interface_active(struct interface_info *ip) {
+#ifdef __FreeBSD__ +#if __FreeBSD_version > 502010
+ struct ifmediareq ifmr; + struct ifmediareq ifmr;
+ int *media_list, i; + int *media_list, i;
+ char *ifname; + char *ifname;
@ -350,7 +350,7 @@
+ return (HAVELINK); + return (HAVELINK);
+} +}
+ +
+#ifdef __FreeBSD__ +#if __FreeBSD_version > 502010
+void +void
+set_ieee80211 (struct interface_info *ip) { +set_ieee80211 (struct interface_info *ip) {
+ +
@ -385,7 +385,7 @@
+ } + }
+ close (sock); + close (sock);
+ } + }
+#endif /* __FreeBSD__ */ +#endif /* __FreeBSD_version */
+ +
+#ifdef ENABLE_POLLING_MODE +#ifdef ENABLE_POLLING_MODE
+/* Go to background after some time */ +/* Go to background after some time */

View file

@ -1,5 +1,14 @@
--- includes/cf/freebsd.h.orig Wed Mar 3 02:32:39 2004 --- includes/cf/freebsd.h.orig Wed Mar 3 02:32:39 2004
+++ includes/cf/freebsd.h Wed Mar 3 02:31:56 2004 +++ includes/cf/freebsd.h Wed Mar 3 02:31:56 2004
@@ -42,7 +42,7 @@
*/
#include <syslog.h>
-#include <sys/types.h>
+#include <sys/param.h>
#include <string.h>
#include <paths.h>
#include <errno.h>
@@ -101,6 +101,10 @@ @@ -101,6 +101,10 @@
#define SOCKLEN_T int #define SOCKLEN_T int
#endif #endif

View file

@ -47,7 +47,7 @@
void state_stop PROTO ((void *)); void state_stop PROTO ((void *));
void state_panic PROTO ((void *)); void state_panic PROTO ((void *));
+ +
+#ifdef __FreeBSD__ +#if __FreeBSD_version > 502010
+void set_ieee80211 PROTO ((struct interface_info *)); +void set_ieee80211 PROTO ((struct interface_info *));
+#endif +#endif
+int interface_active PROTO ((struct interface_info *)); +int interface_active PROTO ((struct interface_info *));

View file

@ -8,7 +8,7 @@
PORTNAME= dhcp PORTNAME= dhcp
PORTVERSION= 3.0.1.r12 PORTVERSION= 3.0.1.r12
PORTREVISION= 1 PORTREVISION= 2
CATEGORIES= net CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_ISC} MASTER_SITES= ${MASTER_SITE_ISC}
MASTER_SITE_SUBDIR= dhcp dhcp/dhcp-3.0-history MASTER_SITE_SUBDIR= dhcp dhcp/dhcp-3.0-history
@ -35,16 +35,6 @@ INSTALL_TARGET= install.${SUBSYS}
SUBSYS?= server SUBSYS?= server
.if ${SUBSYS} == client .if ${SUBSYS} == client
.if ${OSVERSION} >= 502000
# Include 802.11 patches
EXTRA_PATCHES= ${PATCHDIR}/extra-patch-client::clparse.c \
${PATCHDIR}/extra-patch-client::dhclient.8 \
${PATCHDIR}/extra-patch-client::dhclient.c \
${PATCHDIR}/extra-patch-client::dhclient.conf
.else
# 4.x doesn't support interface polling
WITHOUT_INTERFACE_POLLING= Unsupported
.endif
MAN5= dhclient.conf.5 dhclient.leases.5 MAN5= dhclient.conf.5 dhclient.leases.5
MAN8= dhclient.8 dhclient-script.8 MAN8= dhclient.8 dhclient-script.8
.elif ${SUBSYS} == server .elif ${SUBSYS} == server

View file

@ -6,7 +6,7 @@
.\" .\"
+.\" Portions copyright (c) 2000 David E. O'Brien. +.\" Portions copyright (c) 2000 David E. O'Brien.
+.\" All rights reserved. +.\" All rights reserved.
+.\" $FreeBSD: /tmp/pcvs/ports/net/isc-dhcp40-server/files/Attic/extra-patch-client::dhclient.8,v 1.1 2004-03-22 00:41:59 des Exp $ +.\" $FreeBSD$
+.\" +.\"
.TH dhclient 8 .TH dhclient 8
.SH NAME .SH NAME

View file

@ -4,7 +4,7 @@
#include "dhcpd.h" #include "dhcpd.h"
#include "version.h" #include "version.h"
+#ifdef __FreeBSD__ +#if __FreeBSD_version > 502010
+#include <sys/ioctl.h> +#include <sys/ioctl.h>
+#include <net/if_media.h> +#include <net/if_media.h>
+#include <net80211/ieee80211_ioctl.h> +#include <net80211/ieee80211_ioctl.h>
@ -63,7 +63,7 @@
argv [i], (long)strlen (argv [i])); argv [i], (long)strlen (argv [i]));
- strcpy (tmp -> name, argv [i]); - strcpy (tmp -> name, argv [i]);
+ strlcpy (tmp -> name, argv [i], IFNAMSIZ); + strlcpy (tmp -> name, argv [i], IFNAMSIZ);
+#ifdef __FreeBSD__ +#if __FreeBSD_version > 502010
+ set_ieee80211 (tmp); + set_ieee80211 (tmp);
+#endif +#endif
+ /* Init some interface vars, enable polling */ + /* Init some interface vars, enable polling */
@ -79,7 +79,7 @@
INTERFACE_AUTOMATIC)) != INTERFACE_AUTOMATIC)) !=
INTERFACE_REQUESTED)) INTERFACE_REQUESTED))
continue; continue;
+#ifdef __FreeBSD__ +#if __FreeBSD_version > 502010
+ set_ieee80211 (ip); + set_ieee80211 (ip);
+#endif +#endif
+#ifdef ENABLE_POLLING_MODE +#ifdef ENABLE_POLLING_MODE
@ -285,7 +285,7 @@
+/* Check to see if there's a wire plugged in */ +/* Check to see if there's a wire plugged in */
+int +int
+interface_active(struct interface_info *ip) { +interface_active(struct interface_info *ip) {
+#ifdef __FreeBSD__ +#if __FreeBSD_version > 502010
+ struct ifmediareq ifmr; + struct ifmediareq ifmr;
+ int *media_list, i; + int *media_list, i;
+ char *ifname; + char *ifname;
@ -350,7 +350,7 @@
+ return (HAVELINK); + return (HAVELINK);
+} +}
+ +
+#ifdef __FreeBSD__ +#if __FreeBSD_version > 502010
+void +void
+set_ieee80211 (struct interface_info *ip) { +set_ieee80211 (struct interface_info *ip) {
+ +
@ -385,7 +385,7 @@
+ } + }
+ close (sock); + close (sock);
+ } + }
+#endif /* __FreeBSD__ */ +#endif /* __FreeBSD_version */
+ +
+#ifdef ENABLE_POLLING_MODE +#ifdef ENABLE_POLLING_MODE
+/* Go to background after some time */ +/* Go to background after some time */

View file

@ -1,5 +1,14 @@
--- includes/cf/freebsd.h.orig Wed Mar 3 02:32:39 2004 --- includes/cf/freebsd.h.orig Wed Mar 3 02:32:39 2004
+++ includes/cf/freebsd.h Wed Mar 3 02:31:56 2004 +++ includes/cf/freebsd.h Wed Mar 3 02:31:56 2004
@@ -42,7 +42,7 @@
*/
#include <syslog.h>
-#include <sys/types.h>
+#include <sys/param.h>
#include <string.h>
#include <paths.h>
#include <errno.h>
@@ -101,6 +101,10 @@ @@ -101,6 +101,10 @@
#define SOCKLEN_T int #define SOCKLEN_T int
#endif #endif

View file

@ -47,7 +47,7 @@
void state_stop PROTO ((void *)); void state_stop PROTO ((void *));
void state_panic PROTO ((void *)); void state_panic PROTO ((void *));
+ +
+#ifdef __FreeBSD__ +#if __FreeBSD_version > 502010
+void set_ieee80211 PROTO ((struct interface_info *)); +void set_ieee80211 PROTO ((struct interface_info *));
+#endif +#endif
+int interface_active PROTO ((struct interface_info *)); +int interface_active PROTO ((struct interface_info *));