ansilove

ANSI and ASCII art to PNG converter in C
Log | Files | Refs | README | LICENSE

commit 449db5ba63cc63ef26f07ef89f50b047f632e691
parent 00eafcc9ccf6552f219901646badf44193204b93
Author: Frederic Cambus <fred@statdns.com>
Date:   Sat, 26 Oct 2019 22:06:09 +0200

Move conditional includes for 'pledge' and 'strtonum' in compat.h.

Diffstat:
Acompat/compat.h | 12++++++++++++
Msrc/ansilove.c | 9+--------
2 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/compat/compat.h b/compat/compat.h @@ -0,0 +1,12 @@ +#ifndef COMPAT_H +#define COMPAT_H + +#ifndef HAVE_PLEDGE +#include "pledge.h" +#endif + +#ifndef HAVE_STRTONUM +#include "strtonum.h" +#endif + +#endif /* COMPAT_H */ diff --git a/src/ansilove.c b/src/ansilove.c @@ -20,14 +20,6 @@ #include <stdlib.h> #include <string.h> -#ifndef HAVE_PLEDGE -#include "pledge.h" -#endif - -#ifndef HAVE_STRTONUM -#include "strtonum.h" -#endif - #ifdef HAVE_SECCOMP #include <sys/prctl.h> #include <sys/syscall.h> @@ -37,6 +29,7 @@ #include "seccomp.h" #endif +#include "compat.h" #include "config.h" #include "fonts.h" #include "sauce.h"