[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FIX: sysutils/gkrellm/plugins/wireless
- To: ports_(_at_)_openbsd_(_dot_)_org
- Subject: FIX: sysutils/gkrellm/plugins/wireless
- From: Marcus Glocker <marcus_(_at_)_nazgul_(_dot_)_ch>
- Date: Fri, 20 Jan 2006 13:44:38 +0100
Hi,
The attached two patches replaces the existing two patches in
sysutils/gkrellm/plugins/wireless/patches
and fixes the actually broken gkrellm wireless plugin port. The
problem is that OpenBSDs an(4) uses other ioctl(2) requests as
implemented in that software. The an(4) support is turned off by
that patches. It seems that the original patches had the same
effort, but not fully finished.
I've tested the port on i386, but just compilation, and installation
(no OpenBSD/X11 in office), so please test if the plugin does its
job on the supported wireless devices ...
Thanks and Greets,
Marcus
--
Marcus Glocker, marcus_(_at_)_nazgul_(_dot_)_ch, http://www.nazgul.ch -----------------
--- wireless.c.orig Sat Dec 6 14:19:55 2003
+++ wireless.c Fri Jan 20 13:15:48 2006
@@ -91,7 +91,7 @@
}
/* system specific stuff */
-#if defined(__FreeBSD__) || defined(__NetBSD__)
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
/* FreeBSD & NetBSD specific */
static int
@@ -133,7 +133,7 @@
return ret;
}
-#if !defined(__NetBSD__)
+#if !defined(__NetBSD__) && !defined(__OpenBSD__)
static gint
find_an_card(void) {
char interfaces[][4] = {"an0","an1","an2"};
@@ -161,16 +161,16 @@
close(s);
return ret;
}
-#endif /* !defined(__NetBSD__) */
+#endif /* !defined(__NetBSD__) && !defined(__OpenBSD__) */
static gint
find_wlancard(void) {
gint ret = FALSE;
ret = find_wi_card();
-#if !defined(__NetBSD__)
+#if !defined(__NetBSD__) && !defined(__OpenBSD__)
ret = find_an_card() || ret;
-#endif /* !defined(__NetBSD__) */
+#endif /* !defined(__NetBSD__) && !defined(__OpenBSD__) */
return ret;
}
@@ -212,7 +212,7 @@
return TRUE;
}
-#if !defined(__NetBSD__)
+#if !defined(__NetBSD__) && !defined(__OpenBSD__)
static int
get_an_link_quality(wcard_t *card, float *quality, float *level, float *noise) {
int nr,s;
@@ -258,7 +258,7 @@
static int
get_link_quality(wcard_t *card, float *quality, float *level, float *noise) {
switch (card->ifname[0]) {
-#if !defined(__NetBSD__)
+#if !defined(__NetBSD__) && !defined(__OpenBSD__)
case 'a': /* an card */
return get_an_link_quality(card,quality,level,noise);
#endif /* !defined(__NetBSD__) */
--- wireless.h.orig Sat Dec 6 14:19:55 2003
+++ wireless.h Fri Jan 20 13:20:14 2006
@@ -49,6 +49,14 @@
#include <sys/ioctl.h>
#endif
+#ifdef __OpenBSD__
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <sys/ioctl.h>
+ #include <net/if.h>
+ #include <dev/ic/if_wi_ieee.h>
+#endif
+
#define PLUGIN_CONFIG_KEYWORD "gkrellmwireless"
#define WIRELESS_MAJOR_VERSION 2
Visit your host, monkey.org