NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/48560: kevent.udata and void *
>Number: 48560
>Category: kern
>Synopsis: kevent.udata and invalid conversion
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Jan 29 13:45:00 +0000 2014
>Originator: reed%reedmedia.net@localhost
>Release: NetBSD 6
>Organization:
>Environment:
Architecture: x86_64
Machine: amd64
>Description:
For src/sys/sys/event.h
I am told that kevent.udata should maybe be void * since C++ doesn't
allow the naive conversion from a pointer type to integer. Apparently
some other systems have that has void *
error: invalid conversion from 'char*' to '__intptr_t'
I am not sure what prompted the change.
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/sys/event.h.diff?r1=1.1.1.1.2.10&r2=1.1.1.1.2.11
See
http://sourceforge.net/p/asio/git/ci/master/tree/asio/include/asio/detail/impl/kqueue_reactor.ipp
for an example of __NetBSD__ workaround.
>How-To-Repeat:
#include <sys/types.h>
#include <sys/param.h>
#include <sys/event.h>
#include <sys/time.h>
int main ()
{
struct kevent ev;
char* udata;
EV_SET(&ev, 0, 0, 0, 0, 0, udata);
return 0;
}
>Fix:
I don't know if ours is correct or not, but it behaves different than
MacOS and others.
>Unformatted:
Home |
Main Index |
Thread Index |
Old Index