void-packages/srcpkgs/VirtualGL/patches/fix-gcc6-std_min.patch
2016-10-03 16:56:32 +02:00

20 lines
670 B
Diff

With gcc6 there is an error: 'min' was not declared int this scope
Instead of looking for a missing header to include do it the simple way.
--- server/fltk/fl_draw.cxx 2016-02-16 03:25:04.000000000 +0100
+++ server/fltk/fl_draw.cxx 2016-10-03 16:51:17.424915957 +0200
@@ -143,12 +143,12 @@
*symptr++ = *str++);
*symptr = '\0';
if (isspace(*str)) str++;
- symwidth[0] = min(w,h);
+ symwidth[0] = w < h ? w : h;
}
if (str && (p = strrchr(str, '@')) != NULL && p > (str + 1) && p[-1] != '@') {
strlcpy(symbol[1], p, sizeof(symbol[1]));
- symwidth[1] = min(w,h);
+ symwidth[1] = w < h ? w : h;
}
}