Merge pull request #71 from bsdjhb/freebsd_wifi_buildfix
Fix build under FreeBSD after recent changes for Linux.
This commit is contained in:
commit
1935110ef3
@ -65,7 +65,9 @@
|
|||||||
typedef struct {
|
typedef struct {
|
||||||
int flags;
|
int flags;
|
||||||
char essid[IW_ESSID_MAX_SIZE + 1];
|
char essid[IW_ESSID_MAX_SIZE + 1];
|
||||||
|
#ifdef LINUX
|
||||||
uint8_t bssid[ETH_ALEN];
|
uint8_t bssid[ETH_ALEN];
|
||||||
|
#endif
|
||||||
int quality;
|
int quality;
|
||||||
int quality_max;
|
int quality_max;
|
||||||
int quality_average;
|
int quality_average;
|
||||||
@ -77,6 +79,7 @@ typedef struct {
|
|||||||
double frequency;
|
double frequency;
|
||||||
} wireless_info_t;
|
} wireless_info_t;
|
||||||
|
|
||||||
|
#ifdef LINUX
|
||||||
// Like iw_print_bitrate, but without the dependency on libiw.
|
// Like iw_print_bitrate, but without the dependency on libiw.
|
||||||
static void print_bitrate(char *buffer, int buflen, int bitrate) {
|
static void print_bitrate(char *buffer, int buflen, int bitrate) {
|
||||||
const int kilo = 1e3;
|
const int kilo = 1e3;
|
||||||
@ -251,6 +254,7 @@ static int gwi_scan_cb(struct nl_msg *msg, void *data) {
|
|||||||
|
|
||||||
return NL_SKIP;
|
return NL_SKIP;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static int get_wireless_info(const char *interface, wireless_info_t *info) {
|
static int get_wireless_info(const char *interface, wireless_info_t *info) {
|
||||||
memset(info, 0, sizeof(wireless_info_t));
|
memset(info, 0, sizeof(wireless_info_t));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user