Blame SOURCES/spirv-tools-fix.patch

e73726
diff -up SPIRV-Tools-2019.1/tools/io.h.dm SPIRV-Tools-2019.1/tools/io.h
e73726
--- SPIRV-Tools-2019.1/tools/io.h.dm	2019-02-18 14:14:46.362572748 +1000
e73726
+++ SPIRV-Tools-2019.1/tools/io.h	2019-02-18 14:15:12.446271338 +1000
e73726
@@ -34,13 +34,14 @@ bool ReadFile(const char* filename, cons
e73726
     while (size_t len = fread(buf, sizeof(T), buf_size, fp)) {
e73726
       data->insert(data->end(), buf, buf + len);
e73726
     }
e73726
-    if (ftell(fp) == -1L) {
e73726
+    long _pos = ftell(fp);
e73726
+    if (_pos == -1L) {
e73726
       if (ferror(fp)) {
e73726
         fprintf(stderr, "error: error reading file '%s'\n", filename);
e73726
         return false;
e73726
       }
e73726
     } else {
e73726
-      if (sizeof(T) != 1 && (ftell(fp) % sizeof(T))) {
e73726
+      if (sizeof(T) != 1 && (_pos % sizeof(T))) {
e73726
         fprintf(
e73726
             stderr,
e73726
             "error: file size should be a multiple of %zd; file '%s' corrupt\n",