summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2014-12-05 18:05:06 -0800
committerVinson Lee <[email protected]>2014-12-08 16:25:16 -0800
commitd20235f79a4b2786c984175b502b97ac73648781 (patch)
tree320aa3599af188dce151ca45d69192a66c56a3fc /src/mesa
parent70dd3df344ddeb4b6d0f2e990dd1afaf4e46e39f (diff)
i965: Fix union usage for G++ <= 4.6.
This patch fixes this build error with G++ <= 4.6. CXX test_vf_float_conversions.o test_vf_float_conversions.cpp: In function ‘unsigned int f2u(float)’: test_vf_float_conversions.cpp:63:20: error: expected primary-expression before ‘.’ token Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86939 Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/test_vf_float_conversions.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/test_vf_float_conversions.cpp b/src/mesa/drivers/dri/i965/test_vf_float_conversions.cpp
index 2ea36fd3810..6a8bceabf16 100644
--- a/src/mesa/drivers/dri/i965/test_vf_float_conversions.cpp
+++ b/src/mesa/drivers/dri/i965/test_vf_float_conversions.cpp
@@ -60,7 +60,8 @@ union fu {
static unsigned
f2u(float f)
{
- union fu fu = { .f = f };
+ union fu fu;
+ fu.f = f;
return fu.u;
}