common: interface: fix dlsym cast, fix headers for Linux

This commit is contained in:
Alibek Omarov 2023-09-06 22:55:26 +03:00
parent 5bb2221c62
commit 3e907922df

View File

@ -7,9 +7,11 @@
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h>
#include "interface.h" #include "interface.h"
#ifndef _WIN32 // LINUX #ifndef _WIN32 // LINUX
#include <unistd.h>
#include <dlfcn.h> #include <dlfcn.h>
#endif #endif
@ -142,7 +144,7 @@ CreateInterfaceFn Sys_GetFactory( HINTERFACEMODULE hModule )
if(!hModule) if(!hModule)
return NULL; return NULL;
return dlsym( (void *)hModule, CREATEINTERFACE_PROCNAME ); return (CreateInterfaceFn)dlsym( (void *)hModule, CREATEINTERFACE_PROCNAME );
} }
#endif #endif