Mineserver Community

Mineserver => Development => Topic started by: MechWarrior001 on November 12, 2011, 10:40:01 pm



Title: error C2011 when compiling libevent
Post by: MechWarrior001 on November 12, 2011, 10:40:01 pm
When I try to compile Libevent I get this error:

Code:
http.c(145): error C2011: 'addrinfo' : 'struct' type redefinition

which points me to this structure:

Code:
struct addrinfo {
int ai_family;
int ai_socktype;
int ai_protocol;
size_t ai_addrlen;
struct sockaddr *ai_addr;
struct addrinfo *ai_next;
};

It then tells me to look at ws2def.h and this is the declaration it has:

Code:
typedef struct addrinfo
{
    int                 ai_flags;       // AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST
    int                 ai_family;      // PF_xxx
    int                 ai_socktype;    // SOCK_xxx
    int                 ai_protocol;    // 0 or IPPROTO_xxx for IPv4 and IPv6
    size_t              ai_addrlen;     // Length of ai_addr
    char *              ai_canonname;   // Canonical name for nodename
    __field_bcount(ai_addrlen) struct sockaddr *   ai_addr;        // Binary address
    struct addrinfo *   ai_next;        // Next structure in linked list
}

I didn't make any modifications to Libevent, so I'm not sure what I should do.


Title: Re: error C2011 when compiling libevent
Post by: Jailout2000 on November 14, 2011, 02:44:50 am
Looks like a namespace problem.