diff options
author | adrian <adrian@FreeBSD.org> | 2011-01-21 02:53:32 +0000 |
---|---|---|
committer | adrian <adrian@FreeBSD.org> | 2011-01-21 02:53:32 +0000 |
commit | 93b64d585f998cdb9fc20c8e0aab7219bb518dda (patch) | |
tree | b15c06b40a9619b5b8652dcfc6867f3740389f72 /tools | |
parent | 3d09e0bd61776263b8524a64b23b1b03b17e2204 (diff) | |
download | FreeBSD-src-93b64d585f998cdb9fc20c8e0aab7219bb518dda.zip FreeBSD-src-93b64d585f998cdb9fc20c8e0aab7219bb518dda.tar.gz |
Make the existing ath tools build again.
* add missing includes to quieten warnings
* fix an inline function decl to have a return type
* since .h files are created during the build (opt_ah.h, ah_osdep.h)
which modify the behaviour of the HAL include/source files,
include OBJDIR in the path so the #include's work.
The tools should now build when the directory is added to LOCAL_DIRS
during a make buildworld.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/tools/ath/Makefile.inc | 1 | ||||
-rw-r--r-- | tools/tools/ath/athdebug/athdebug.c | 4 | ||||
-rw-r--r-- | tools/tools/ath/athdecode/main.c | 2 | ||||
-rw-r--r-- | tools/tools/ath/athprom/athprom.c | 1 | ||||
-rw-r--r-- | tools/tools/ath/athrd/athrd.c | 1 | ||||
-rw-r--r-- | tools/tools/ath/athregs/dumpregs.c | 3 | ||||
-rw-r--r-- | tools/tools/ath/athstats/athstats.c | 12 | ||||
-rw-r--r-- | tools/tools/ath/athstats/main.c | 1 |
8 files changed, 22 insertions, 3 deletions
diff --git a/tools/tools/ath/Makefile.inc b/tools/tools/ath/Makefile.inc index 4706949..2459cca 100644 --- a/tools/tools/ath/Makefile.inc +++ b/tools/tools/ath/Makefile.inc @@ -11,3 +11,4 @@ CFLAGS+=-I${.CURDIR}/../common CFLAGS+=-I${.CURDIR}/../../../../sys CFLAGS+=-I${.CURDIR}/../../../../sys/dev/ath CFLAGS+=-I${.CURDIR}/../../../../sys/dev/ath/ath_hal +CFLAGS+=-I${.OBJDIR}/ diff --git a/tools/tools/ath/athdebug/athdebug.c b/tools/tools/ath/athdebug/athdebug.c index a219aae..d1c2c14 100644 --- a/tools/tools/ath/athdebug/athdebug.c +++ b/tools/tools/ath/athdebug/athdebug.c @@ -37,11 +37,15 @@ #include <sys/file.h> #include <sys/ioctl.h> #include <sys/socket.h> +#include <sys/sysctl.h> #include <stdio.h> #include <ctype.h> #include <getopt.h> #include <stdlib.h> +#include <string.h> +#include <strings.h> +#include <err.h> #define N(a) (sizeof(a)/sizeof(a[0])) diff --git a/tools/tools/ath/athdecode/main.c b/tools/tools/ath/athdecode/main.c index 977ae14..4d05447 100644 --- a/tools/tools/ath/athdecode/main.c +++ b/tools/tools/ath/athdecode/main.c @@ -37,6 +37,8 @@ #include "dumpregs.h" #include <stdlib.h> +#include <string.h> +#include <err.h> #include <sys/file.h> #include <sys/stat.h> #include <sys/mman.h> diff --git a/tools/tools/ath/athprom/athprom.c b/tools/tools/ath/athprom/athprom.c index bbcf7ac..6f2b32b 100644 --- a/tools/tools/ath/athprom/athprom.c +++ b/tools/tools/ath/athprom/athprom.c @@ -43,6 +43,7 @@ #include <err.h> #include <stdlib.h> #include <string.h> +#include <ctype.h> #ifndef DIR_TEMPLATE #define DIR_TEMPLATE "/usr/local/libdata/athprom" diff --git a/tools/tools/ath/athrd/athrd.c b/tools/tools/ath/athrd/athrd.c index 4cacddf..d71d676 100644 --- a/tools/tools/ath/athrd/athrd.c +++ b/tools/tools/ath/athrd/athrd.c @@ -43,6 +43,7 @@ #include <stdarg.h> #include <string.h> #include <unistd.h> +#include <ctype.h> int ath_hal_debug = 0; HAL_CTRY_CODE cc = CTRY_DEFAULT; diff --git a/tools/tools/ath/athregs/dumpregs.c b/tools/tools/ath/athregs/dumpregs.c index 8225779..50e8a1e 100644 --- a/tools/tools/ath/athregs/dumpregs.c +++ b/tools/tools/ath/athregs/dumpregs.c @@ -41,6 +41,7 @@ #include <stdlib.h> #include <string.h> #include <ctype.h> +#include <err.h> typedef struct { HAL_REVS revs; @@ -353,7 +354,7 @@ register_range(u_int brange, u_int erange, int type, def_srev_min, def_srev_max, def_phy_min, def_phy_max); } -static __inline +static __inline int match(const struct dumpreg *dr, const HAL_REVS *revs) { if (!MAC_MATCH(dr, revs->ah_macVersion, revs->ah_macRev)) diff --git a/tools/tools/ath/athstats/athstats.c b/tools/tools/ath/athstats/athstats.c index be729c1..8bd5ea7 100644 --- a/tools/tools/ath/athstats/athstats.c +++ b/tools/tools/ath/athstats/athstats.c @@ -47,10 +47,18 @@ #include <unistd.h> #include <err.h> +/* Use the system net80211 headers, rather than the kernel tree */ +/* + * XXX this means that if you build a separate net80211 stack + * XXX with your kernel and don't install the new/changed headers, + * XXX this tool may break. + * XXX -adrian + */ +#include <net80211/ieee80211_ioctl.h> +#include <net80211/ieee80211_radiotap.h> + #include "ah.h" #include "ah_desc.h" -#include "ieee80211_ioctl.h" -#include "ieee80211_radiotap.h" #include "if_athioctl.h" #include "athstats.h" diff --git a/tools/tools/ath/athstats/main.c b/tools/tools/ath/athstats/main.c index 8f17cfb..489c0bd 100644 --- a/tools/tools/ath/athstats/main.c +++ b/tools/tools/ath/athstats/main.c @@ -45,6 +45,7 @@ #include <stdlib.h> #include <signal.h> #include <unistd.h> +#include <string.h> #include <err.h> #include "athstats.h" |