Jump to content

Utorrent 1.8 / 1.8.1 beta doesn't work under Wine 1.1.3


deathnoise

Recommended Posts

I'm using Freebsd 7.0 with Wine 1.3.1 and the newest version - Utorrent 1.8.1 beta build 12024

IT DOESN'T WORK

It can't even check if there's a new version of utorrent available-> i'm getting this: "Unable to contact Utorrent update server"

I also checked BitComet - and it's working properly.. On the same OS platform, the same Wine 1.3.1...

So, it's not a problem with my conf or something...

Link to comment
Share on other sites

  • 4 weeks later...

@deathnoise: Use this LD_PRELOAD-able wrapper.

I think, this is a wine problem. Because getaddrinfo is called with ai_socktype=0 as hint, which makes the FreeBSD getaddrinfo fail with EAI_SERVICE, as seen in debugging output.

But this is valid on windows, so wine has to be extended on FreeBSD in order to prevent getaddrinfo calls with ai_socktype=0.

Compile this file (gcc -shared -o foobar.so foobar.c):

#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <dlfcn.h>

static int (*next_getaddrinfo)(const char *hostname, const char *servname, const struct addrinfo *hints, struct addrinfo **res) = NULL;

int getaddrinfo(const char *hostname, const char *servname,
const struct addrinfo *hints, struct addrinfo **res) {
const char *msg;
int ret;

struct addrinfo my_hints;

if(next_getaddrinfo == NULL) {
next_getaddrinfo = dlsym(RTLD_NEXT, "getaddrinfo");

if ((msg = dlerror()) != NULL) {
fprintf(stderr, "ioctl: dlopen failed : %s\n", msg);
fflush(stderr);
exit(1);
}
}

my_hints = *hints;

if(hints->ai_socktype == 0) {
my_hints.ai_socktype = SOCK_STREAM;
}
ret = next_getaddrinfo(hostname, servname, &my_hints, res);
fprintf(stderr, "getaddrinfo(%s, %s, {family=%x,socktype=%x,protocol=%x})\n", hostname, servname, my_hints.ai_family,my_hints.ai_socktype,my_hints.ai_protocol);
fflush(stderr);
return ret;
}

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...