summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz93@gmail.com>2024-03-12 00:07:17 -0400
committerSam James <sam@gentoo.org>2024-03-12 05:15:39 +0000
commit65c4d815a053b023f48cf96ca632a2afe8cb394a (patch)
tree7c709653084fd94e73cd2e0481105f06734c8a29 /net-print
parentnet-print/mtink: update HOMEPAGE, SRC_URI (diff)
downloadgentoo-65c4d815a053b023f48cf96ca632a2afe8cb394a.tar.gz
gentoo-65c4d815a053b023f48cf96ca632a2afe8cb394a.tar.bz2
gentoo-65c4d815a053b023f48cf96ca632a2afe8cb394a.zip
net-print/mtink: fix LTO and Modern C bugs
Import a patch from debian which fixes both issues by: - including the correct headers - avoiding conflicting definitions of two functions by deleting the conflicting one and #include'ing the other one everywhere Closes: https://bugs.gentoo.org/861854 Closes: https://bugs.gentoo.org/885963 Signed-off-by: Eli Schwartz <eschwartz93@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-print')
-rw-r--r--net-print/mtink/files/mtink-1.0.16-fix-function-declarations.patch57
-rw-r--r--net-print/mtink/mtink-1.0.16-r2.ebuild1
2 files changed, 58 insertions, 0 deletions
diff --git a/net-print/mtink/files/mtink-1.0.16-fix-function-declarations.patch b/net-print/mtink/files/mtink-1.0.16-fix-function-declarations.patch
new file mode 100644
index 000000000000..459341f63a79
--- /dev/null
+++ b/net-print/mtink/files/mtink-1.0.16-fix-function-declarations.patch
@@ -0,0 +1,57 @@
+Description: fix function declarations
+ This patch fixes various conflicting and implicit function declarations
+ reported by goto-cc from the cbmc package.
+Bug-Debian: http://bugs.debian.org/749433
+Author: Graham Inggs <graham@nerve.org.za>
+Forwarded: No, nothing left to forward to
+Last-Update: 2015-05-31
+--- a/mainSrc/cmd.h
++++ b/mainSrc/cmd.h
+@@ -70,6 +70,4 @@
+ }
+ #endif
+
+-extern int devRead(int fd, unsigned char *buf, int len, int timeout);
+-extern int devWrite(int fd, unsigned char *buf, int len, int timeout);
+ #endif
+--- a/mainSrc/rw.c
++++ b/mainSrc/rw.c
+@@ -18,6 +18,8 @@
+
+ #ifndef MACOS
+ #include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
+ #include <unistd.h>
+ #include <fcntl.h>
+ #include <errno.h>
+--- a/mainSrc/cmd.c
++++ b/mainSrc/cmd.c
+@@ -53,6 +53,7 @@
+ #include "mtink.h"
+ #include "cmd.h"
+ #include "d4lib.h"
++#include "rw.h"
+
+ #ifdef MACOS
+ #include "usbHlp.h"
+--- a/mainSrc/gimp-mtink.c
++++ b/mainSrc/gimp-mtink.c
+@@ -23,6 +23,7 @@
+
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include <libgimp/gimp.h>
+ #include <unistd.h>
+ #include <dirent.h>
+--- a/detect/askPrinter.c
++++ b/detect/askPrinter.c
+@@ -1,6 +1,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <unistd.h>
+ #include <sys/ioctl.h>
+ #include <fcntl.h>
+ #include <sys/time.h>
diff --git a/net-print/mtink/mtink-1.0.16-r2.ebuild b/net-print/mtink/mtink-1.0.16-r2.ebuild
index 32b8c51473ac..4d46836b2d1f 100644
--- a/net-print/mtink/mtink-1.0.16-r2.ebuild
+++ b/net-print/mtink/mtink-1.0.16-r2.ebuild
@@ -32,6 +32,7 @@ PATCHES=(
"${FILESDIR}"/${P}-flags.patch
"${FILESDIR}"/${P}-motif.patch
"${FILESDIR}"/${P}-fno-common.patch
+ "${FILESDIR}"/${P}-fix-function-declarations.patch
)
src_prepare() {