mirror of
https://github.com/darlinghq/darling-libkqueue.git
synced 2024-11-23 11:49:50 +00:00
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:
parent
a9f15f94b5
commit
d46b5e43bf
@ -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 */
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
{
|
||||
|
12
test/vnode.c
12
test/vnode.c
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user