Control: tags -1 patch

On Mon, 30 Jun 2014 00:44:18 +0800 Sphinx Jiang <yishan...@gmail.com> wrote:
> The package csmash ftbfs  on mips64el for lacking mips64 support, I updated
> the 01-loadparts.patch, and it build success on mips64.

Hi,

I saw the build failure on mips64el as well. I've updated the patch to
just cast 0 to size_t so it should work on any architecture without the
need of any ifdefs (the patch should completely replace the existing
01-loadparts.patch file).

Thanks,
James
Description: fix build failure on 64-bit arches
 cast 0 to size_t in loadparts.cpp to help the compiler deduce the correct
 template type
Author: James Cowgill <james...@cowgill.org.uk>
Forwarded: no
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/loadparts.cpp
+++ b/loadparts.cpp
@@ -245,7 +245,7 @@ bool parts::loadfile(const char *str)
 
 	while ('\\' == line[l-1]) {
             // concat next line(s)
-	    int bufsize = clamp(0U, sizeof(line)-l, sizeof(line)-1);
+	    int bufsize = clamp((size_t) 0, sizeof(line)-l, sizeof(line)-1);
 	    fgets(&line[l-2], bufsize, fp);
 	    if (feof((FILE*)fp)) break;
 	    l = strlen(line);

Reply via email to