diff --git a/cmake/ConkyPlatformChecks.cmake b/cmake/ConkyPlatformChecks.cmake index 7c6415714..39cd66d7c 100644 --- a/cmake/ConkyPlatformChecks.cmake +++ b/cmake/ConkyPlatformChecks.cmake @@ -137,15 +137,20 @@ if(BUILD_NCURSES AND OS_DARWIN) set(conky_libs ${conky_libs} -lncurses) endif(BUILD_NCURSES AND OS_DARWIN) -if(BUILD_MATH) - set(conky_libs ${conky_libs} -lm) -endif(BUILD_MATH) +if(BUILD_WLAN AND OS_DARWIN) + find_library(CW CoreWLAN) + set(conky_libs ${conky_libs} ${CW}) +endif(BUILD_WLAN AND OS_DARWIN) if(OS_DARWIN AND BUILD_IPGFREQ) find_library(IPG IntelPowerGadget) set(conky_libs ${conky_libs} ${IPG}) endif(OS_DARWIN AND BUILD_IPGFREQ) +if(BUILD_MATH) + set(conky_libs ${conky_libs} -lm) +endif(BUILD_MATH) + if(BUILD_ICAL) check_include_files(libical/ical.h ICAL_H_) if(NOT ICAL_H_) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5598a34f0..fbe5432df 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -134,7 +134,7 @@ endif(OS_HAIKU) if(OS_DARWIN) set(darwin - darwin.cc darwin.h + darwin.mm darwin.h darwin_sip.h i18n.h ) diff --git a/src/darwin.cc b/src/darwin.mm similarity index 99% rename from src/darwin.cc rename to src/darwin.mm index d66498609..d83e3d1e5 100644 --- a/src/darwin.cc +++ b/src/darwin.mm @@ -72,6 +72,10 @@ #include #endif +#ifdef BUILD_WLAN +#import +#endif + /* clock_gettime includes */ #ifndef HAVE_CLOCK_GETTIME #include @@ -636,6 +640,14 @@ int update_meminfo() { return 0; } +#ifdef BUILD_WLAN + +void update_wlan_stats(struct net_stat *ns) { + +} + +#endif + int update_net_stats() { struct net_stat *ns; double delta; @@ -655,6 +667,10 @@ int update_net_stats() { if ((ifa->ifa_flags & IFF_UP) != 0u) { struct ifaddrs *iftmp; +#ifdef BUILD_WLAN + update_wlan_stats(ns); +#endif + ns->up = 1; last_recv = ns->recv; last_trans = ns->trans;