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
1 changed files with 3 additions and 1 deletions

View File

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