While I agree that nowadays a common reserved c++ word shouldn't be in a header file, an easy enough workaround is to simply:<br><br>extern "C" {<br>#include <evdns.h><br>#include <...><br>}<br><br>
which is my habit when pulling in any C files from C++;<br>It has the added benefit of ensuring that the function names don't get mangled if you're doing some crazy linking or some such.<br><br><div><span class="gmail_quote">
On 10/2/07, <b class="gmail_sendername">Roger Clark</b> <<a href="mailto:rogerclark@gmail.com">rogerclark@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
At least on my system, gcc complains about 'class' being used in these<br>places in evdns.h:<br><br>struct evdns_server_question {<br> int type;<br> int class;<br> char name[1];<br>};<br><br>and<br><br>int evdns_server_request_add_reply(struct evdns_server_request *req,
<br>int section, const char *name, int type, int class, int ttl, int<br>datalen, int is_name, const char *data);<br><br>It's probably a good idea to be on the safe side and change these<br>identifiers to something else. I'm sure someone else will run into the
<br>problem eventually.<br><br>--<br>Roger Clark<br><a href="mailto:rogerclark@gmail.com">rogerclark@gmail.com</a><br>_______________________________________________<br>Libevent-users mailing list<br><a href="mailto:Libevent-users@monkey.org">
Libevent-users@monkey.org</a><br><a href="http://monkey.org/mailman/listinfo/libevent-users">http://monkey.org/mailman/listinfo/libevent-users</a><br></blockquote></div><br>