+/* Licensed under GPLv3+ - see LICENSE file for details */
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <sys/types.h>
#include <sys/wait.h>
+#include <signal.h>
#include <errno.h>
#include <assert.h>
#include <err.h>
/* Then we remap into the middle of it. */
munmap(p->pool, size+PADDING);
- p->pool = mmap(p->pool + PADDING/2, size, PROT_READ|PROT_WRITE,
+ p->pool = mmap((char *)p->pool + PADDING/2, size, PROT_READ|PROT_WRITE,
MAP_SHARED, fd, 0);
if (p->pool == MAP_FAILED)
goto fail_free;
p = atp->p = talloc(atp, struct at_pool_contents);
- if (sscanf(argv[1], "AT:%p/%lu/%i/%i/%i/%p",
+ if (sscanf(argv[1], "AT:%p/%lu/%i/%i/%i/%p",
&p->pool, &p->poolsize, &p->fd,
&p->parent_rfd, &p->parent_wfd, arg) != 6) {
errno = EINVAL;