aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorKirill Ponomarev <krion@FreeBSD.org>2004-03-13 23:22:59 +0000
committerKirill Ponomarev <krion@FreeBSD.org>2004-03-13 23:22:59 +0000
commitd2e3a1c9e0ee989fb58626cb5a87ad5546396eeb (patch)
treeaef53288a825d47aece5ea5955534208ad9ce1b0 /net
parentc6f4893b0242e3117397f44f90e3a6414bdd457a (diff)
- Fix build on 5-x !386 systems
PR: ports/64225 Submitted by: Hendrik Scholz <hendrik@scholz.net>
Notes
Notes: svn path=/head/; revision=103910
Diffstat (limited to 'net')
-rw-r--r--net/wistumbler2/Makefile4
-rw-r--r--net/wistumbler2/files/patch-gpscontrol.c12
-rw-r--r--net/wistumbler2/files/patch-speaker.c42
3 files changed, 56 insertions, 2 deletions
diff --git a/net/wistumbler2/Makefile b/net/wistumbler2/Makefile
index 0f3c9761c1b4..0e93eb3e159f 100644
--- a/net/wistumbler2/Makefile
+++ b/net/wistumbler2/Makefile
@@ -34,8 +34,8 @@ MAKE_ENV= PREFIX=${LOCALBASE} USE_GTK=0
.include <bsd.port.pre.mk>
-.if ${ARCH} != "i386" || ${OSVERSION} < 500000
-BROKEN= "Does not compile on !i386 or 4.x"
+.if ${OSVERSION} < 500000
+BROKEN= "Does not compile on 4.x"
.endif
pre-everything::
diff --git a/net/wistumbler2/files/patch-gpscontrol.c b/net/wistumbler2/files/patch-gpscontrol.c
new file mode 100644
index 000000000000..5703576d050a
--- /dev/null
+++ b/net/wistumbler2/files/patch-gpscontrol.c
@@ -0,0 +1,12 @@
+--- src/gpscontrol.c.orig Sat Nov 15 22:44:45 2003
++++ src/gpscontrol.c Sun Mar 14 00:15:19 2004
+@@ -37,6 +37,9 @@
+ #include <unistd.h>
+ #include <fcntl.h>
+ #include <termios.h>
++#ifdef __FreeBSD__
++#include <string.h>
++#endif
+ #include <strings.h>
+ #include "gpscontrol.h"
+
diff --git a/net/wistumbler2/files/patch-speaker.c b/net/wistumbler2/files/patch-speaker.c
new file mode 100644
index 000000000000..bd8ec197dc2a
--- /dev/null
+++ b/net/wistumbler2/files/patch-speaker.c
@@ -0,0 +1,42 @@
+--- src/speaker.c.orig Mon Nov 17 21:47:38 2003
++++ src/speaker.c Sun Mar 14 00:15:30 2004
+@@ -31,16 +31,29 @@
+ * $Id: stumbler.c,v 1.5 2003/11/14 15:54:29 pancake Exp $
+ */
+
++#ifdef __FreeBSD__
++#ifdef __i386__
++#define _HAVE_SPEAKER
++#endif
++#elif __NetBSD__
++#define _HAVE_SPEAKER
++#endif
++
++
+ #include <stdio.h>
+ #include <string.h>
+ #include <unistd.h>
+ #include <stdlib.h>
+ #ifdef __FreeBSD__
++#ifdef _HAVE_SPEAKER
+ #include <machine/speaker.h>
++#endif
+ #else
+ #include <machine/spkr.h>
+ #endif
+
++#ifdef _HAVE_SPEAKER
++
+ #define SPKR_DEV "/dev/speaker"
+ #define SPKR_SPD "L08"
+
+@@ -100,4 +113,8 @@
+ //}
+ fclose(fd);
+ }
+-
++#else
++ /* no speaker support */
++void swap_beep(void) {}
++void do_beep(int pc) {}
++#endif