anacron: fix various missing prototype warnings
authorMike Frysinger <vapier@gentoo.org>
Mon, 10 Aug 2015 07:49:57 +0000 (03:49 -0400)
committerMike Frysinger <vapier@gentoo.org>
Mon, 10 Aug 2015 07:59:51 +0000 (03:59 -0400)
sys-process/anacron/anacron-2.3-r3.ebuild
sys-process/anacron/files/anacron-2.3-headers.patch [new file with mode: 0644]

index 202cfdd6b88993aeec9bc1ae58c735fb811751d7..0af2e1f2fd30f5148d39da9cf77b3a6179032b70 100644 (file)
@@ -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 (file)
index 0000000..2d4b176
--- /dev/null
@@ -0,0 +1,40 @@
+add headers for various function prototypes
+
+--- a/main.c
++++ b/main.c
+@@ -24,6 +24,7 @@
+ #include <time.h>
+ #include <stdio.h>
++#include <stdlib.h> /* exit */
+ #include <unistd.h>
+ #include <signal.h>
+ #include <fcntl.h>
+--- a/log.c
++++ b/log.c
+@@ -37,6 +37,7 @@
+ #include <unistd.h>
+ #include <syslog.h>
+ #include <stdio.h>
++#include <stdlib.h> /* exit */
+ #include <stdarg.h>
+ #include <errno.h>
+ #include <signal.h>
+@@ -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 <stdio.h>
++#include <string.h> /* memset */
+ #include <regex.h>
+ #include <stdarg.h>
+ #include <stdlib.h>