aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2012-09-10 13:15:02 +0000
committerAnders Broman <anders.broman@ericsson.com>2012-09-10 13:15:02 +0000
commit84c57e6eb6634d77b7ca532d56c8cea48348267d (patch)
tree6fc1df049eec916bbcba8a47ad867d23bb50b3f5
parent0fc383a98fc99cbfe2832f3cffae16b8ffa86eca (diff)
From Pontus Fuchs.
new check for the configure script to disable the tool bar if the nl80211.h is not good enough. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6973 svn path=/trunk/; revision=44839
-rw-r--r--configure.ac10
-rw-r--r--ws80211_utils.c4
2 files changed, 12 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index e9c3d22db2..978c376bf5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -254,6 +254,16 @@ elif (test "${have_libnl1}" = "yes"); then
enable_airpcap=no
fi
+AC_MSG_CHECKING([if nl80211.h is new enough])
+ AC_TRY_COMPILE([#include <linux/nl80211.h>],
+ [int x = NL80211_FREQUENCY_ATTR_MAX_TX_POWER;
+ x = NL80211_ATTR_SUPPORTED_IFTYPES;
+ x = NL80211_ATTR_SUPPORTED_COMMANDS;
+ x = NL80211_ATTR_WIPHY_FREQ;
+ x = NL80211_CHAN_NO_HT;],
+ [AC_MSG_RESULT(yes) AC_DEFINE(HAVE_NL80211, 1, [nl80211.h is new ehough])],
+ [AC_MSG_RESULT(no)])
+
AC_MSG_CHECKING([for NL80211_SET_CHANNEL])
AC_TRY_COMPILE([#include <linux/nl80211.h>],
[enum nl80211_commands x = NL80211_CMD_SET_CHANNEL;],
diff --git a/ws80211_utils.c b/ws80211_utils.c
index 95c6d20fc3..fca1701fcc 100644
--- a/ws80211_utils.c
+++ b/ws80211_utils.c
@@ -33,7 +33,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "ws80211_utils.h"
-#ifdef HAVE_LIBNL
+#if defined(HAVE_LIBNL) && defined(HAVE_NL80211
#include <strings.h>
#include <errno.h>
#include <unistd.h>
@@ -705,4 +705,4 @@ gchar *ws80211_chan_type_to_str(int type _U_)
{
return NULL;
}
-#endif /* HAVE_LIBNL */
+#endif /* HAVE_LIBNL && HAVE_NL80211 */