summaryrefslogtreecommitdiff
path: root/sysutils/dd_rescue
diff options
context:
space:
mode:
authormef <mef@pkgsrc.org>2013-06-14 01:07:58 +0000
committermef <mef@pkgsrc.org>2013-06-14 01:07:58 +0000
commit39f4c37d2c97175203a2b4aa08773e1b85d86407 (patch)
treec17358c08db0a8d917ab4d8b860bdb20625bb03c /sysutils/dd_rescue
parent55cc654c701c569a48baf78cc09656e7a6281c26 (diff)
downloadpkgsrc-39f4c37d2c97175203a2b4aa08773e1b85d86407.tar.gz
patch-ab modified to fix clang build problem:
(1) clang flags: dd_rescue.c:1494:22: warning: implicit declaration of function 'basename' is invalid in C99 [-Wimplicit-function-declaration] const char* ibase = basename(inm); (3) clang flags: dd_recue.c:(.text+0x12b4): undefined reference to `mypread' dd_rescue.c:(.text+0x1374): undefined reference to `mypwrite' Reported by joerg@ bulkbuild, and discussed on tech-pkg@, thanks.
Diffstat (limited to 'sysutils/dd_rescue')
-rw-r--r--sysutils/dd_rescue/distinfo4
-rw-r--r--sysutils/dd_rescue/patches/patch-ab42
2 files changed, 40 insertions, 6 deletions
diff --git a/sysutils/dd_rescue/distinfo b/sysutils/dd_rescue/distinfo
index f4087d87886..0b5d0206729 100644
--- a/sysutils/dd_rescue/distinfo
+++ b/sysutils/dd_rescue/distinfo
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.7 2013/06/04 00:47:46 mef Exp $
+$NetBSD: distinfo,v 1.8 2013/06/14 01:07:58 mef Exp $
SHA1 (dd_rescue-1.33.tar.gz) = cb21524fec919d32b7263b7999e2c8b26e7273cd
RMD160 (dd_rescue-1.33.tar.gz) = ed39efddcf3fa6708926cb31c9b32020e0d59208
Size (dd_rescue-1.33.tar.gz) = 36923 bytes
SHA1 (patch-aa) = ae11e96371b3b815b066a2dcedd869c90d4b89ff
-SHA1 (patch-ab) = 4ff83cbe0528f8d3db0c0af4d1e135ebad055561
+SHA1 (patch-ab) = b590da5113cf4367b52d2042f036acbe6e330fbe
SHA1 (patch-frandom_c) = dd3c300df7a2f6cee6c981507c1dd17b39c47fb2
diff --git a/sysutils/dd_rescue/patches/patch-ab b/sysutils/dd_rescue/patches/patch-ab
index a21100af61e..91992e03f70 100644
--- a/sysutils/dd_rescue/patches/patch-ab
+++ b/sysutils/dd_rescue/patches/patch-ab
@@ -1,11 +1,27 @@
-$NetBSD: patch-ab,v 1.6 2013/06/04 00:47:46 mef Exp $
+$NetBSD: patch-ab,v 1.7 2013/06/14 01:07:58 mef Exp $
+(1) clang flags:
+dd_rescue.c:1494:22: warning: implicit declaration of function 'basename' is invalid in C99 [-Wimplicit-function-declaration]
+ const char* ibase = basename(inm);
+(2)
See http://gnats.netbsd.org/38620
dd_rescue: (fatal): allocation of aligned buffer failed!
+(3) clang flags:
+dd_recue.c:(.text+0x12b4): undefined reference to `mypread'
+dd_rescue.c:(.text+0x1374): undefined reference to `mypwrite'
+
--- dd_rescue.c.orig 2013-03-31 04:24:34.000000000 +0900
-+++ dd_rescue.c 2013-04-08 17:03:27.000000000 +0900
-@@ -121,6 +121,10 @@ _syscall6(long, splice, int, fdin, loff_
++++ dd_rescue.c 2013-06-13 16:44:35.000000000 +0900
+@@ -83,6 +83,7 @@
+ #include <limits.h>
+ #include <sys/time.h>
+ #include <sys/stat.h>
++#include <libgen.h>
+
+ #include "frandom.h"
+ #include "list.h"
+@@ -121,6 +122,10 @@
# endif
#endif
@@ -16,7 +32,25 @@ dd_rescue: (fatal): allocation of aligned buffer failed!
/* fwd decls */
int cleanup();
-@@ -1452,6 +1456,11 @@ unsigned char* zalloc_buf(unsigned int b
+@@ -740,7 +745,7 @@
+ return ln;
+ }
+
+-inline ssize_t mypread(int fd, void* bf, size_t sz, off_t off)
++static inline ssize_t mypread(int fd, void* bf, size_t sz, off_t off)
+ {
+ if (i_repeat) {
+ if (i_rep_init)
+@@ -762,7 +767,7 @@
+ return pread(fd, bf, sz, off);
+ }
+
+-inline ssize_t mypwrite(int fd, void* bf, size_t sz, off_t off)
++static inline ssize_t mypwrite(int fd, void* bf, size_t sz, off_t off)
+ {
+ if (o_chr)
+ return write(fd, bf, sz);
+@@ -1452,6 +1457,11 @@
unsigned char *ptr;
#ifdef O_DIRECT
void *mp;