Merge pull request #109 from Namaneo/emscripten

Fix Emscripten build
This commit is contained in:
LibretroAdmin 2023-04-13 10:36:00 +02:00 committed by GitHub
commit e9520349f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 5 deletions

View File

@ -80,7 +80,7 @@ struct STDROMReaderData
void* STDROMReaderInit(const char* filename)
{
#ifndef _MSC_VER
#if !defined(_MSC_VER) && !defined(__EMSCRIPTEN__)
struct stat sb;
if (stat(filename, &sb) == -1)
return 0;

View File

@ -69,7 +69,8 @@
#if defined(_WIN32) && defined(__LIBRETRO__)
#include "frontend/windows/winpcap/pcap.h"
#elif defined(HAVE_LIBNX) || defined(__IOS__) || defined(ANDROID) || defined(GEKKO) || defined(_3DS)
#elif defined(HAVE_LIBNX) || defined(__IOS__) || defined(ANDROID) || defined(GEKKO) || defined(_3DS) || defined(__EMSCRIPTEN__)
#define NO_PCAP
typedef void* pcap_pkthdr;
#else
#include <pcap/pcap.h>
@ -3098,7 +3099,7 @@ static const u8 SoftAP_DeauthFrame[] = {
static void SoftAP_RXPacketGet_Callback(u_char *userData, const pcap_pkthdr *pktHeader, const u_char *pktData)
{
#if defined(HAVE_LIBNX) || defined(__IOS__) || defined(ANDROID) || defined(GEKKO) || defined(_3DS)
#if defined(NO_PCAP)
return;
#else
const WIFI_IOREG_MAP &io = wifiHandler->GetWifiData().io;
@ -3558,7 +3559,7 @@ void* SoftAPCommInterface::_GetBridgeDeviceAtIndex(int deviceIndex, char *outErr
void *deviceList = NULL;
void *theDevice = NULL;
#if defined(HAVE_LIBNX) || defined(__IOS__) || defined(ANDROID) || defined(GEKKO) || defined(_3DS)
#if defined(NO_PCAP)
return theDevice;
#else
int result = this->_pcap->findalldevs((void **)&deviceList, outErrorBuf);
@ -4499,7 +4500,7 @@ int WifiHandler::GetBridgeDeviceList(std::vector<std::string> *deviceStringList)
return result;
}
#if defined(HAVE_LIBNX) || defined(__IOS__) || defined(ANDROID) || defined(GEKKO) || defined(_3DS)
#if defined(NO_PCAP)
return result;
#else
char errbuf[PCAP_ERRBUF_SIZE];