From 3e7ac349872aa2986a68cd8cb9d13663b27dd69d Mon Sep 17 00:00:00 2001 From: RadWolfie Date: Sat, 30 May 2020 20:55:28 -0500 Subject: [PATCH] pcap delay load module require SEH --- src/devices/EmuNVNet.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/devices/EmuNVNet.cpp b/src/devices/EmuNVNet.cpp index 571567ca3..9c060360a 100644 --- a/src/devices/EmuNVNet.cpp +++ b/src/devices/EmuNVNet.cpp @@ -617,7 +617,9 @@ bool NVNetDevice::PCAPInit() char errorBuffer[PCAP_ERRBUF_SIZE]; // Open the desired network adapter +#ifdef _MSC_VER // TODO: Implement loaded pcap driver detection for cross-platform support or make a requirement for non-Windows platform. __try { +#endif char buffer[MAX_PATH]; snprintf(buffer, MAX_PATH, "\\Device\\NPF_%s", m_HostAdapterName.c_str()); m_AdapterHandle = pcap_open_live(buffer, @@ -626,10 +628,12 @@ bool NVNetDevice::PCAPInit() 1, // Read Timeout errorBuffer ); +#ifdef _MSC_VER } __except(EXCEPTION_EXECUTE_HANDLER) { m_AdapterHandle = nullptr; snprintf(errorBuffer, PCAP_ERRBUF_SIZE, "Could not initialize pcap"); } +#endif if (m_AdapterHandle == nullptr) { EmuLog(LOG_LEVEL::WARNING, "Unable to open Network Adapter:\n%s\nNetworking will be disabled", errorBuffer);