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.
This commit is contained in:
Adrian Chadd 2011-01-21 02:53:32 +00:00
parent 2e2b4ad457
commit 1045db19f5
8 changed files with 22 additions and 3 deletions

View File

@ -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}/

View File

@ -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]))

View File

@ -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>

View File

@ -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"

View File

@ -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;

View File

@ -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))

View File

@ -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"

View File

@ -45,6 +45,7 @@
#include <stdlib.h>
#include <signal.h>
#include <unistd.h>
#include <string.h>
#include <err.h>
#include "athstats.h"