Fork me on GitHub
  August 19, 2018, 09:11:15 pm
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: error C2011 when compiling libevent  (Read 3458 times)
MechWarrior001
Newbie
*
Posts: 31


View Profile
« 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.
Logged
Jailout2000
Newbie
*
Posts: 49


Enthusiast


View Profile WWW
« Reply #1 on: November 14, 2011, 02:44:50 am »

Looks like a namespace problem.
Logged

Visit my website to see what's up with me.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!