addPath: notifyingAbout Flag Issue #1

Closed
saulpower opened this Issue Apr 8, 2012 · 2 comments

Projects

None yet

2 participants

@saulpower

I'm using VDKQueue on OS X 10.7.3 in xCode 4.2 and I get a "Use of Undeclared Identifier" error on VDKQueueNotifyDefault when I try to run the following code:

VDKQueue* kqueue = [[VDKQueue alloc] init];
[kqueue addPath:@"/path/to/directory/" notifyingAbout:VDKQueueNotifyDefault];

It's actually providing undeclared identifier errors on all the u_int flags in VDKQueue.h. When I call just the "addPath" method everything works fine.

@bdkjones
Owner
bdkjones commented Apr 8, 2012

The defines for the events in VDKQueue.h are directly mapped to the defines used by the OS X kernel itself. In order to use them, you need to add this line to the top of any class where you do:

#include <sys/event.h>

That will resolve the undefined errors. Also, there's no reason to use the -notifyingAbout method unless you're going to use the default event set. The -addPath: method uses the default event set, so you can simply use that method instead.

@bdkjones bdkjones closed this Apr 8, 2012
@bdkjones
Owner
bdkjones commented Apr 8, 2012

I will update the comments in the header to make this clear; as there's currently no mention of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment