1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-21 20:38:45 +00:00

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
PORTVERSION= 3.0.1.r12
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_ISC}
MASTER_SITE_SUBDIR= dhcp dhcp/dhcp-3.0-history
@ -35,16 +35,6 @@ INSTALL_TARGET= install.${SUBSYS}
SUBSYS?= server
.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
MAN8= dhclient.8 dhclient-script.8
.elif ${SUBSYS} == server

View File

@ -6,7 +6,7 @@
.\"
+.\" Portions copyright (c) 2000 David E. O'Brien.
+.\" 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
.SH NAME

View File

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

View File

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

View File

@ -8,7 +8,7 @@
PORTNAME= dhcp
PORTVERSION= 3.0.1.r12
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_ISC}
MASTER_SITE_SUBDIR= dhcp dhcp/dhcp-3.0-history
@ -35,16 +35,6 @@ INSTALL_TARGET= install.${SUBSYS}
SUBSYS?= server
.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
MAN8= dhclient.8 dhclient-script.8
.elif ${SUBSYS} == server

View File

@ -6,7 +6,7 @@
.\"
+.\" Portions copyright (c) 2000 David E. O'Brien.
+.\" 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
.SH NAME

View File

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

View File

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

View File

@ -8,7 +8,7 @@
PORTNAME= dhcp
PORTVERSION= 3.0.1.r12
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_ISC}
MASTER_SITE_SUBDIR= dhcp dhcp/dhcp-3.0-history
@ -35,16 +35,6 @@ INSTALL_TARGET= install.${SUBSYS}
SUBSYS?= server
.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
MAN8= dhclient.8 dhclient-script.8
.elif ${SUBSYS} == server

View File

@ -6,7 +6,7 @@
.\"
+.\" Portions copyright (c) 2000 David E. O'Brien.
+.\" 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
.SH NAME

View File

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

View File

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

View File

@ -8,7 +8,7 @@
PORTNAME= dhcp
PORTVERSION= 3.0.1.r12
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_ISC}
MASTER_SITE_SUBDIR= dhcp dhcp/dhcp-3.0-history
@ -35,16 +35,6 @@ INSTALL_TARGET= install.${SUBSYS}
SUBSYS?= server
.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
MAN8= dhclient.8 dhclient-script.8
.elif ${SUBSYS} == server

View File

@ -6,7 +6,7 @@
.\"
+.\" Portions copyright (c) 2000 David E. O'Brien.
+.\" 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
.SH NAME

View File

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

View File

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