From 3fe39007621dcdad3c00c32ac4cb5fc588f23429 Mon Sep 17 00:00:00 2001 From: Juergen Buchmueller Date: Mon, 3 Oct 2016 16:56:09 +0200 Subject: [PATCH] VirtualGL: another fix for gcc6 building --- .../VirtualGL/patches/fix-gcc6-std_min.patch | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 srcpkgs/VirtualGL/patches/fix-gcc6-std_min.patch diff --git a/srcpkgs/VirtualGL/patches/fix-gcc6-std_min.patch b/srcpkgs/VirtualGL/patches/fix-gcc6-std_min.patch new file mode 100644 index 00000000000..49b27d2600f --- /dev/null +++ b/srcpkgs/VirtualGL/patches/fix-gcc6-std_min.patch @@ -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; + } + } +