diff --git a/cmake/ConkyPlatformChecks.cmake b/cmake/ConkyPlatformChecks.cmake index 6d26b971..e33284ad 100644 --- a/cmake/ConkyPlatformChecks.cmake +++ b/cmake/ConkyPlatformChecks.cmake @@ -89,7 +89,7 @@ if(BUILD_WLAN) if(NOT IWLIB_LIB) message(FATAL_ERROR "Unable to find libiw.so") endif(NOT IWLIB_LIB) - set(CMAKE_REQUIRED_LIBRARIES ${IWLIB_LIB}) + set(conky_libs ${conky_libs} ${IWLIB_LIB}) check_function_exists(iw_sockets_open IWLIB_SOCKETS_OPEN_FUNC) endif(BUILD_WLAN) diff --git a/src/linux.cc b/src/linux.cc index 5b18f9fe..c2272ea0 100644 --- a/src/linux.cc +++ b/src/linux.cc @@ -76,7 +76,7 @@ #define NBD_MAJOR 43 #endif -#ifdef HAVE_IWLIB +#ifdef BUILD_WLAN #include #endif @@ -356,7 +356,7 @@ void update_net_stats(void) char buf[256]; double delta; -#ifdef HAVE_IWLIB +#ifdef BUILD_WLAN // wireless info variables int skfd, has_bitrate = 0; struct wireless_info *winfo; @@ -496,9 +496,9 @@ void update_net_stats(void) } } -#ifdef HAVE_IWLIB +#ifdef BUILD_WLAN /* update wireless info */ - winfo = malloc(sizeof(struct wireless_info)); + winfo = (struct wireless_info *) malloc(sizeof(struct wireless_info)); memset(winfo, 0, sizeof(struct wireless_info)); skfd = iw_sockets_open();