From ae7a779ea86da53b366558de4e6fd83434d52d48 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Mon, 5 May 2014 11:18:05 -0400 Subject: [PATCH] add ifdef to fix compilation on ubuntu 12.04 --- wireless.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wireless.cpp b/wireless.cpp index c1efd38..2193d1f 100644 --- a/wireless.cpp +++ b/wireless.cpp @@ -550,7 +550,10 @@ int Wireless::nl80211_interface_cb(struct nl_msg *msg, void *arg) { case NL80211_IFTYPE_MESH_POINT: { *(callback->iftypeString) = "Mesh Point"; break; } case NL80211_IFTYPE_P2P_CLIENT: { *(callback->iftypeString) = "P2P Client"; break; } case NL80211_IFTYPE_P2P_GO: { *(callback->iftypeString) = "P2P Go"; break; } +#if defined(NL80211_IFTYPE_P2P_DEVICE) + // ubuntu 12.04 doesn't define this type case NL80211_IFTYPE_P2P_DEVICE: { *(callback->iftypeString) = "P2P Device"; break; } +#endif default: { *(callback->iftypeString) = "Unspecified"; break; } }