Definition conflict: EV_ERROR
191919
191919 at gmail.com
Thu Feb 9 08:08:04 CET 2012
This happened when I tried to compile lighttpd with libev backend.
I have patched lighttpd to make it compilable, but I still think libev should avoid the name conflict, esp. with those of OS.
Thank you.
FYI the patch:
--- src/fdevent.h 2012-02-09 15:05:34.000000000 +0800
+++ src/fdevent.orig 2012-02-09 15:05:27.000000000 +0800
@@ -61,6 +61,7 @@
#if defined HAVE_LIBEV
# define USE_LIBEV
+# undef EV_ERROR
# include <ev.h>
#endif
--
191919
Le jeudi, février 9, 2012 à 3:55 AM, Marc Lehmann a écrit :
> On Wed, Feb 08, 2012 at 08:43:18PM +0800, 191919 <191919 at gmail.com (mailto:191919 at gmail.com)> wrote:
> > In ev.h, EV_ERROR is defined as an enum value:
> >
> > EV_ERROR = 0x80000000 /* sent when an error occurs */
> >
> > but in systems which have kqueue, EV_ERROR is defined for the use of kqueue itself:
> >
> > /usr/include/sys/event.h:#define EV_ERROR 0x4000 /* error, data contains errno */
>
> ev.h doesn't include sys/event.h - how do you get a conflict? the compiled
> libev itself uses the wrong value for EV_ERROR?
>
> > I suggest libev rename EV_ERROR to EV_EVERROR or something else.
>
> Well, too late for that.
>
> If you run into a problem becaue libev uses the wrong symbol for EV_ERROR,
> can you add this to the *end* of ev_kqueue.c and see if that fixes these
> problems?
>
> #undef EV_ERROR
>
> --
> The choice of a Deliantra, the free code+content MORPG
> -----==- _GNU_ http://www.deliantra.net
> ----==-- _ generation
> ---==---(_)__ __ ____ __ Marc Lehmann
> --==---/ / _ \/ // /\ \/ / schmorp at schmorp.de (mailto:schmorp at schmorp.de)
> -=====/_/_//_/\_,_/ /_/\_\
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.schmorp.de/pipermail/libev/attachments/20120209/43c0396c/attachment.html>
More information about the libev
mailing list