compel/test: Resolve missing includes

Resolves #1333

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
This commit is contained in:
Radostin Stoyanov 2021-01-11 00:00:02 +00:00 committed by Andrei Vagin
parent c7544894fe
commit ae686848b2
5 changed files with 14 additions and 2 deletions

View file

@ -5,6 +5,8 @@
#include <sys/un.h>
#include <stdint.h>
#include <common/compiler.h>
struct parasite_ctl;
extern int __must_check compel_rpc_sync(unsigned int cmd, struct parasite_ctl *ctl);
extern int __must_check compel_rpc_call(unsigned int cmd, struct parasite_ctl *ctl);

View file

@ -1,7 +1,7 @@
#include <errno.h>
#include <compel/plugins/plugin-fds.h>
#include <compel/infect-rpc.h>
#include <compel/plugins/plugin-fds.h>
/*
* Stubs for std compel plugin.
@ -15,6 +15,6 @@ void parasite_cleanup(void) { }
int parasite_daemon_cmd(int cmd, void *args)
{
if (cmd == PARASITE_CMD_GETFD)
fds_send_fd(2);
return (fds_send_fd(2) < 0);
return 0;
}

View file

@ -5,6 +5,10 @@
#include <stdlib.h>
#include <sys/wait.h>
#include <compel/log.h>
#include <compel/infect-rpc.h>
#include <compel/infect-util.h>
#include "parasite.h"
#define PARASITE_CMD_GETFD PARASITE_USER_CMDS

View file

@ -3,6 +3,9 @@
#include <stdlib.h>
#include <sys/wait.h>
#include <compel/log.h>
#include <compel/infect-rpc.h>
#include "parasite.h"
#define PARASITE_CMD_INC PARASITE_USER_CMDS

View file

@ -4,6 +4,9 @@
#include <sys/wait.h>
#include <sys/syscall.h>
#include <compel/log.h>
#include <compel/infect.h>
static void print_vmsg(unsigned int lvl, const char *fmt, va_list parms)
{
printf("\tLC%u: ", lvl);