tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

(sysutils/dd_rescue) Re: broken packages for 2013q2



| sysutils/dd_rescue               dd_rescue                     open        
2013q2  1.33                 
|              Seen:               joerg-nbsd-amd64-clang 20130607.1617         
                          
|                                  joerg-nbsd-amd64-clang 20130611.1242         
                          
|              undefined references to own functions                            
                          

Attached patch fixes clang issue and packages OK on gcc either
(both only tested only on NetBSD/amd64, 6.99.21 - clang or 6.1 - gcc).

Shall I file PR ?
---
Makoto Fujiwara
mef%NetBSD.org@localhost

Index: sysutils/dd_rescue/distinfo
===================================================================
RCS file: /cvs/cvsroot/pkgsrc/sysutils/dd_rescue/distinfo,v
retrieving revision 1.7
diff -u -r1.7 distinfo
--- sysutils/dd_rescue/distinfo 4 Jun 2013 00:47:46 -0000       1.7
+++ sysutils/dd_rescue/distinfo 13 Jun 2013 07:49:27 -0000
@@ -4,5 +4,5 @@
 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) = 4d17f198b390e907877464429e44cd0fb13c755e
 SHA1 (patch-frandom_c) = dd3c300df7a2f6cee6c981507c1dd17b39c47fb2
Index: sysutils/dd_rescue/patches/patch-ab
===================================================================
RCS file: /cvs/cvsroot/pkgsrc/sysutils/dd_rescue/patches/patch-ab,v
retrieving revision 1.6
diff -u -r1.6 patch-ab
--- sysutils/dd_rescue/patches/patch-ab 4 Jun 2013 00:47:46 -0000       1.6
+++ sysutils/dd_rescue/patches/patch-ab 13 Jun 2013 07:49:27 -0000
@@ -1,11 +1,31 @@
 $NetBSD: patch-ab,v 1.6 2013/06/04 00:47:46 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'
+
+(4) clag flags:
+dd_rescue.c:1495:31: warning: passing 'const char *' to parameter of type 
'char *' discards qualifiers [-Wincompatible-pointer-types]
+        const char* ibase = basename(inm);
+
 --- 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 +36,25 @@
  /* 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;
@@ -28,3 +66,12 @@
        if (posix_memalign(&mp, pagesize, bs)) {
                fplog(stderr, "dd_rescue: (fatal): allocation of aligned buffer 
failed!\n");
                cleanup(); exit(18);
+@@ -1482,7 +1492,7 @@
+ 
+ char* retstrdupcat3(const char* dir, char dirsep, const char* inm)
+ {
+-      const char* ibase = basename(inm);
++      const char* ibase = basename((char *) inm);
+       const int dlen = strlen(dir) + (dirsep>0? 1: dirsep);
+       char* ret = malloc(dlen + strlen(inm) + 1);
+       strcpy(ret, dir);



Home | Main Index | Thread Index | Old Index