VirtualGL: another fix for gcc6 building

This commit is contained in:
Juergen Buchmueller 2016-10-03 16:56:09 +02:00
parent 92847e784e
commit 3fe3900762

View File

@ -0,0 +1,20 @@
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;
}
}