1
0
Fork 0
mirror of https://github.com/pygos/init.git synced 2024-05-19 20:26:14 +02:00
init/lib/include/util.h
David Oberhollenzer 60efd9dc33 Remove unused SOCK_FLAG_* enum
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-06-16 18:20:26 +02:00

29 lines
558 B
C

/* SPDX-License-Identifier: ISC */
#ifndef UTIL_H
#define UTIL_H
#include <sys/types.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdio.h>
#include "config.h"
#ifdef __GNUC__
#define NORETURN __attribute__((noreturn))
#endif
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
typedef struct exec_t {
struct exec_t *next;
int argc; /* number of elements in argument vector */
char args[]; /* argument vectot string blob */
} exec_t;
int setup_tty(const char *tty, bool truncate);
NORETURN void argv_exec(exec_t *e);
#endif /* UTIL_H */