open-plc-utils: new package
[buildroot-gz.git] / package / mesa3d / 0002-Fix-runtime-error-with-uClibc.patch
blob6fca65fd352765d5a0d28fd71e9d65d8bf5f2faf
1 Fix runtime error with uClibc
3 Patch sent upstream:
4 http://lists.freedesktop.org/archives/mesa-dev/2015-March/079431.html
7 From b1dae3cae9df36d9c4f64c342cfe7c106e34ec72 Mon Sep 17 00:00:00 2001
8 From: Bernd Kuhls <bernd.kuhls@t-online.de>
9 Date: Sun, 15 Mar 2015 12:23:26 +0100
10 Subject: [PATCH 1/1] Fix runtime error with uClibc
12 Patch inspired by
13 https://www.winehq.org/pipermail/wine-bugs/2011-September/288987.html
14 http://git.alpinelinux.org/cgit/aports/tree/main/wine/uclibc-fmaxf-fminf.patch?id=c9b491b6099eec02a835ffd05539b5c783c6c43a
16 Starting an app using mesa3d 10.5.x, Kodi for example, fails:
18 /usr/lib/kodi/kodi.bin: symbol 'fminf': can't resolve symbol in lib '/usr/lib/dri/i965_dri.so'.
19 libGL error: unable to load driver: i965_dri.so
20 libGL error: driver pointer missing
21 libGL error: failed to load driver: i965
22 libGL error: unable to load driver: swrast_dri.so
23 libGL error: failed to load driver: swrast
25 Here is some background information about the fminf/fmaxf situation in uClibc:
26 http://thread.gmane.org/gmane.comp.lib.uclibc.general/24189
28 Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
29 ---
30 src/glsl/nir/nir_constant_expressions.py | 12 ++++++++++++
31 1 file changed, 12 insertions(+)
33 diff --git a/src/glsl/nir/nir_constant_expressions.py b/src/glsl/nir/nir_constant_expressions.py
34 index 22bc4f0..139c25a 100644
35 --- a/src/glsl/nir/nir_constant_expressions.py
36 +++ b/src/glsl/nir/nir_constant_expressions.py
37 @@ -50,6 +50,18 @@ static double copysign(double x, double y)
39 #endif
41 +#ifdef __UCLIBC__
42 +float fmaxf(float a, float b)
44 + return (a > b) ? a : b;
47 +float fminf(float a, float b)
49 + return (a < b) ? a : b;
51 +#endif
53 /**
54 * Evaluate one component of packSnorm4x8.
56 --
57 1.7.10.4