tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Incompatible definition of "struct kevent" in "sys/event.h"



I think I used intptr_t so that the value could be used either as a poiner
or just a flag (value) holder without casting.

What's the problem in libtorrent?

Jaromir

On Thu, Jun 04, 2009 at 11:26:55AM +0100, Matthias Scheler wrote:
> 
>       Hello,
> 
> "struct kevent" as defined in "sys/event.h" looks like this:
> 
> struct kevent {
> [...]
>         intptr_t        udata;          /* opaque user data identifier */
> };
> 
> The problem is that FreeBSD, OpenBSD and Darwin all define "udata"
> as "void". This causes problems in e.g. the "libtorrent" package.
> This is a deliberate change in NetBSD:
> 
> ----------------------------
> revision 1.1.1.1.2.11
> date: 2002/10/02 19:09:36;  author: jdolecek;  state: Exp;  lines: +2 -2
> make 'udata' field of struct kevent intptr_t (was 'void *')
> ----------------------------
> 
> Does anybody know why this incompatibility was invented?
> 
>       Kind regards
> 
> -- 
> Matthias Scheler                                  http://zhadum.org.uk/

-- 
Jaromir Dolecek <jdolecek%NetBSD.org@localhost>            http://www.NetBSD.cz/
-=- We can walk our road together if our goals are all the same;     -=-
-=- We can run alone and free if we pursue a different aim.          -=-


Home | Main Index | Thread Index | Old Index