| Summary: | KDENetwork-3.2 does not compile because: "/usr/include/iwlib.h:339: error: too few arguments to function" | ||
|---|---|---|---|
| Product: | [Unmaintained] kwireless | Reporter: | jaime |
| Component: | general | Assignee: | Stefan Winter <swinter> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
jaime
2004-02-16 22:19:20 UTC
Forgot to cc the bug report on this...
cheers
domi
Hi,
Can anyone please review the following kdenetwork patch ? It fixes
kdenetwork/wifi compilation with iwlib27 ( which broke backwards
compatibility ). Note that I have no idea what the iw_range parameter
is, but from the code in the wireless-tools iwlib.c source, I am sure
that it is never used unless has_range is set to non-zero. As said in
the comment above my modification, someone who knows more about this
code should look into the new interface.
As usual, this patch compiles for me, unless anyone objects, I am
going to commit this to 3_2_BRANCH and HEAD.
cheers
domi
Index: wifi/wirelesstools.cpp
===================================================================
RCS file: /home/kde/kdenetwork/wifi/Attic/wirelesstools.cpp,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 wirelesstools.cpp
--- wifi/wirelesstools.cpp 14 Feb 2004 10:34:10 -0000 1.1.2.1
+++ wifi/wirelesstools.cpp 27 Feb 2004 21:00:36 -0000
@@ -11,6 +11,21 @@
#include "stuff.h"
#include "wirelesstools.h"
+// domi:the wireless-tools people managed to change their interfaces
+// around. Someone with more knowledge of this code should look into
+// moving to use the new iw_range interfaces.
+#if WT_VERSION >= 27
+inline int wtc_private_iw_get_stats( int skfd, char* ifname, iwstats* stats )
+{
+ return iw_get_stats( skfd, ifname, stats, 0, 0 );
+}
+#else
+inline int wtc_private_iw_get_stats( int skfd, char* ifname, iwstats* stats )
+{
+ return iw_get_stats( skfd, ifname, stats, 0, 0 );
+}
+#endif
+
/* ================================== FROM IWCONFIG.C ================================== */
int get_info(int skfd, char * ifname, struct wireless_info * info)
{
@@ -154,7 +169,7 @@
#endif /* WIRELESS_EXT > 10 */
/* Get stats */
- if(iw_get_stats(skfd, ifname, &(info->stats)) >= 0)
+ if(wtc_private_iw_get_stats(skfd, ifname, &(info->stats)) >= 0)
{
info->has_stats = 1;
}
@@ -198,7 +213,7 @@
{
char device[128];
snprintf(device,128,"%s",(*it).latin1());
- iw_get_stats (transfer->skfd, device, tempic2);
+ wtc_private_iw_get_stats (transfer->skfd, device, tempic2);
kdDebug() << "Found!\n";
already_warned=false;
transfer->has_freq = tempic1->has_freq;
@@ -258,7 +273,7 @@
{
char device[128];
snprintf(device,128,"%s",transfer->used_interface.latin1());
- iw_get_stats (transfer->skfd, device, tempic2);
+ wtc_private_iw_get_stats (transfer->skfd, device, tempic2);
transfer->has_freq = tempic1->has_freq;
transfer->freq = tempic1->freq;
transfer->mode = tempic1->mode;
Hi, the error occurs because of wireless-tools 27 API changes. You can either downgrade to wireless-tools 26 or use KDE 3.2.1, where the new API is used if wireless-tools 27 is found. |