Final fixes for Android.

The testsuite runs on Linux and Android now.


git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@595 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
This commit is contained in:
mheily 2012-11-26 03:59:02 +00:00
parent a9f15f94b5
commit d46b5e43bf
4 changed files with 17 additions and 5 deletions

View File

@ -20,6 +20,7 @@
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include "config.h"
#include "tree.h"
/* Maximum events returnable in a single kevent() call */

View File

@ -23,9 +23,6 @@ struct filter;
#include <sys/queue.h>
#include <sys/inotify.h>
#include <sys/eventfd.h>
#if HAVE_SYS_SIGNALFD_H
# include <sys/signalfd.h>
#endif
#if HAVE_SYS_TIMERFD_H
# include <sys/timerfd.h>
#endif

View File

@ -16,6 +16,12 @@
#include "private.h"
#if HAVE_SYS_SIGNALFD_H
# include <sys/signalfd.h>
#else
# error signalfd is required
#endif
static void
signalfd_reset(int sigfd)
{

View File

@ -245,8 +245,16 @@ test_evfilt_vnode(struct test_context *ctx)
return;
#endif
snprintf(ctx->testfile, sizeof(ctx->testfile), "/tmp/kqueue-test%d.tmp",
testing_make_uid());
char *tmpdir = getenv("TMPDIR");
if (tmpdir == NULL)
#ifdef __ANDROID__
tmpdir = "/data/local/tmp";
#else
tmpdir = "/tmp";
#endif
snprintf(ctx->testfile, sizeof(ctx->testfile), "%s/kqueue-test%d.tmp",
tmpdir, testing_make_uid());
test(kevent_vnode_add, ctx);
test(kevent_vnode_del, ctx);