From 5e28659690a42ec29adbb3f21c9481e638022faa Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 10 Aug 2015 03:49:57 -0400 Subject: [PATCH] anacron: fix various missing prototype warnings --- sys-process/anacron/anacron-2.3-r3.ebuild | 1 + .../anacron/files/anacron-2.3-headers.patch | 40 +++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 sys-process/anacron/files/anacron-2.3-headers.patch diff --git a/sys-process/anacron/anacron-2.3-r3.ebuild b/sys-process/anacron/anacron-2.3-r3.ebuild index 202cfdd6b889..0af2e1f2fd30 100644 --- a/sys-process/anacron/anacron-2.3-r3.ebuild +++ b/sys-process/anacron/anacron-2.3-r3.ebuild @@ -21,6 +21,7 @@ RDEPEND="${RDEPEND} src_prepare() { epatch "${FILESDIR}"/${P}-compile-fix-from-debian.patch + epatch "${FILESDIR}"/${P}-headers.patch sed -i \ -e '/^CFLAGS/{s:=:+=:;s:-O2::}' \ Makefile || die diff --git a/sys-process/anacron/files/anacron-2.3-headers.patch b/sys-process/anacron/files/anacron-2.3-headers.patch new file mode 100644 index 000000000000..2d4b1762d357 --- /dev/null +++ b/sys-process/anacron/files/anacron-2.3-headers.patch @@ -0,0 +1,40 @@ +add headers for various function prototypes + +--- a/main.c ++++ b/main.c +@@ -24,6 +24,7 @@ + + #include + #include ++#include /* exit */ + #include + #include + #include +--- a/log.c ++++ b/log.c +@@ -37,6 +37,7 @@ + #include + #include + #include ++#include /* exit */ + #include + #include + #include +@@ -78,6 +79,7 @@ make_msg(const char *fmt, va_list args) + strcpy(msg + sizeof(msg) - sizeof(truncated), truncated); + } + ++#define log my_log /* log is a math builtin */ + static void + log(int priority, const char *fmt, va_list args) + /* Log a message, described by "fmt" and "args", with the specified +--- a/matchrx.c ++++ b/matchrx.c +@@ -23,6 +23,7 @@ + + + #include ++#include /* memset */ + #include + #include + #include -- 2.26.2