Skip to content

Commit

Permalink
fix: further msvc specific fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
codedwrench committed Jan 12, 2024
1 parent 84908c1 commit 96f8217
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ if (WIN32)
)
else()
# MSVC specific steps
list(APPEND PLATFORM_SPECIFIC_LIBRARIES "delayimp.lib")
list(APPEND PLATFORM_SPECIFIC_LIBRARIES "delayimp.lib" "winmm.lib")

# We need to load wpcap
add_link_options(/DELAYLOAD:wpcap.dll)
Expand Down
1 change: 1 addition & 0 deletions Sources/UserInterface/AboutWindow.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* Copyright (c) 2021 [Rick de Bondt] - AboutWindow.cpp */
#include <algorithm>

#include "UserInterface/AboutWindow.h"

Expand Down
1 change: 1 addition & 0 deletions Sources/UserInterface/HUDWindow.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* Copyright (c) 2021 [Rick de Bondt] - HUDWindow.cpp */
#include <algorithm>

#include "UserInterface/HUDWindow.h"

Expand Down
8 changes: 7 additions & 1 deletion Sources/WifiInterfaceWindows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
#define UNICODE
#endif

#ifndef _MSC_VER
#define STDCALL __attribute__((stdcall))
#else
#define STDCALL __stdcall
#endif

// available network flags
#define WLAN_AVAILABLE_NETWORK_CONNECTED 0x00000001 // This network is currently connected
#define WLAN_AVAILABLE_NETWORK_HAS_PROFILE 0x00000002 // There is a profile for this network
Expand Down Expand Up @@ -105,7 +111,7 @@ static std::wstring GenerateXML(const std::wstring& aSSID)
return lFirst + aSSID + lSecond;
}

static void __attribute__((stdcall)) WlanCallback(WLAN_NOTIFICATION_DATA* aScanNotificationData, PVOID aContext)
static void STDCALL WlanCallback(WLAN_NOTIFICATION_DATA* aScanNotificationData, PVOID aContext)
{
// Get the data from my struct. If it's null, nothing to do
auto* lCallbackInfo = static_cast<WLAN_CALLBACK_INFO*>(aContext);
Expand Down

0 comments on commit 96f8217

Please sign in to comment.