Mineserver > Development

error C2011 when compiling libevent

(1/1)

MechWarrior001:
When I try to compile Libevent I get this error:


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

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;
};

--- End code ---

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
}

--- End code ---

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

Jailout2000:
Looks like a namespace problem.

Navigation

[0] Message Index

Go to full version