diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2025-03-08 10:43:12 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2025-03-08 10:43:12 +0100 |
| commit | fc02f0d140a9e95018b9a74c354b8979dc81f1c8 (patch) | |
| tree | 9c63b55804fb133bda1af6cce58a860e8a798282 /src | |
| parent | c2d02977f8565b0ba19149a7c283af5680c065e7 (diff) | |
| download | box64-fc02f0d140a9e95018b9a74c354b8979dc81f1c8.tar.gz box64-fc02f0d140a9e95018b9a74c354b8979dc81f1c8.zip | |
[BOX32][WRAPPER] Fixed some gnutls wrapped functions (help NFS Payback from Steam)
Diffstat (limited to 'src')
| -rw-r--r-- | src/wrapped32/wrappedgnutls.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/wrapped32/wrappedgnutls.c b/src/wrapped32/wrappedgnutls.c index caefc8bc..9df6f9a1 100644 --- a/src/wrapped32/wrappedgnutls.c +++ b/src/wrapped32/wrappedgnutls.c @@ -19,13 +19,9 @@ #include "callback.h" #include "converter32.h" -static const char* gnutlsName = -#if ANDROID - "libgnutls.so" -#else - "libgnutls.so.30" -#endif - ; +static const char* gnutlsName = "libgnutls.so.30"; +#define ALTNAME "libgnutls.so" + #define LIBNAME gnutls #include "generated/wrappedgnutlstypes32.h" @@ -69,7 +65,8 @@ static void* find_gnutls_log_Fct(void* fct) static uintptr_t my_pullpush_fct_##A = 0; \ static long my_pullpush_##A(void* p, void* d, size_t l) \ { \ - return (long)RunFunctionFmt(my_pullpush_fct_##A, "ppL", p, d, l); \ + long_t ret = (long_t)RunFunctionFmt(my_pullpush_fct_##A, "ppL", p, d, l); \ + return from_long(ret);\ } SUPER() #undef GO @@ -126,12 +123,12 @@ EXPORT void* my32_gnutls_certificate_get_peers(x64emu_t* emu, void* session, int if(size) *size = num; if(!ret) return NULL; static datum_32_t res[128]; - if(num>128) {printf_log(LOG_NONE, "BOX32: Warning, return buffer for gnutls_certificate_get_peers too small: %d\n", size); num=128;} + if(num>128) {printf_log(LOG_NONE, "BOX32: Warning, return buffer for gnutls_certificate_get_peers too small: %d\n", num); num=128;} for(int i=0; i<num; ++i) { res[i].data = to_ptrv(ret[i].p0); res[i].size = ret[i].u1; } - return ret; + return res; } EXPORT void my32_gnutls_global_set_log_function(x64emu_t* emu, void* f) |