diff options
author | tron <tron> | 1998-06-27 16:09:10 +0000 |
---|---|---|
committer | tron <tron> | 1998-06-27 16:09:10 +0000 |
commit | e71a9bbf31216559054ff16392c71d6579415fd1 (patch) | |
tree | 328efddc5acef580472e98e2fdd5d01e94a5e308 /devel/libscsi | |
parent | 1636426aef50a341177228737157cdc158feb77f (diff) | |
download | pkgsrc-e71a9bbf31216559054ff16392c71d6579415fd1.tar.gz |
Fix broken "va_lists" calls to get this work on alpha. Patches supplied
by Tim Rightnour in PR pkg/5618.
Diffstat (limited to 'devel/libscsi')
-rw-r--r-- | devel/libscsi/patches/patch-ac | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/devel/libscsi/patches/patch-ac b/devel/libscsi/patches/patch-ac new file mode 100644 index 00000000000..cd10d1ab4db --- /dev/null +++ b/devel/libscsi/patches/patch-ac @@ -0,0 +1,73 @@ +--- scsi.c.orig Sat Jun 20 02:30:03 1998 ++++ scsi.c Sat Jun 20 03:00:07 1998 +@@ -353,2 +353,11 @@ + ++static int wrap_do_buff_decode(u_char *databuf, size_t len, ++void (*arg_put)(void *, int , void *, int, char *), void *puthook, ++char *fmt, ...) ++{ ++ va_list ap; ++ va_start(ap,fmt); ++ return do_buff_decode(databuf,len,arg_put,puthook,fmt,ap); ++} ++ + int scsireq_decode(scsireq_t *scsireq, char *fmt, ...) +@@ -364,5 +373,4 @@ + { +- va_list ap = (va_list)0; +- return do_buff_decode(scsireq->databuf, (size_t)scsireq->datalen, +- arg_put, puthook, fmt, ap); ++ return wrap_do_buff_decode(scsireq->databuf, (size_t)scsireq->datalen, ++ arg_put, puthook, fmt); + } +@@ -379,4 +387,3 @@ + { +- va_list ap = (va_list)0; +- return do_buff_decode(buff, len, arg_put, puthook, fmt, ap); ++ return wrap_do_buff_decode(buff, len, arg_put, puthook, fmt); + } +@@ -752,2 +759,10 @@ + ++static int wrap_do_encode(u_char *buff, size_t vec_max, size_t *used, ++int (*arg_get)(void *, char *), void *gethook, char *fmt, ...) ++{ ++ va_list ap; ++ va_start(ap,fmt); ++ return do_encode(buff,vec_max,used,arg_get,gethook,fmt,ap); ++} ++ + /* XXX: Should be a constant in scsiio.h +@@ -760,3 +775,3 @@ + { +- int cmdlen; ++ size_t cmdlen; + va_list ap; +@@ -800,4 +815,3 @@ + { +- int cmdlen; +- va_list ap = (va_list) 0; ++ size_t cmdlen; + +@@ -826,4 +840,4 @@ + +- if (do_encode(scsireq->cmd, CMD_BUFLEN, &cmdlen, arg_get, gethook, +- cmd_spec, ap) == -1) ++ if (wrap_do_encode(scsireq->cmd, CMD_BUFLEN, &cmdlen, arg_get, gethook, ++ cmd_spec) == -1) + return 0; +@@ -851,5 +865,4 @@ + { +- va_list ap = (va_list)0; +- return do_encode(buff, len, 0, +- arg_get, gethook, fmt, ap); ++ return wrap_do_encode(buff, len, 0, ++ arg_get, gethook, fmt); + } +@@ -859,5 +872,4 @@ + { +- va_list ap = (va_list)0; +- return do_encode(scsireq->databuf, scsireq->datalen, 0, +- arg_get, gethook, fmt, ap); ++ return wrap_do_encode(scsireq->databuf, scsireq->datalen, 0, ++ arg_get, gethook, fmt); + } |