[Mesa-dev] [PATCH] mesa: Fix build errors on x86+sse

ville.syrjala at linux.intel.com ville.syrjala at linux.intel.com
Thu Mar 5 11:32:22 PST 2015


From: Ville Syrjälä <ville.syrjala at linux.intel.com>

tnl/t_vertex_sse.c: In function ‘build_vertex_emit’:
tnl/t_vertex_sse.c:500:6: error: implicit declaration of function ‘printf’ [-Werror=implicit-function-declaration]
      printf("Can't emit 1ub %x %x %d\n", a->vertoffset, a[-1].vertoffset, a[-1].vertattrsize );
      ^
tnl/t_vertex_sse.c:500:6: warning: incompatible implicit declaration of built-in function ‘printf’ [enabled by default]
tnl/t_vertex_sse.c:546:6: warning: incompatible implicit declaration of built-in function ‘printf’ [enabled by default]
      printf("Can't emit 3ub\n");
      ^
tnl/t_vertex_sse.c:594:6: warning: incompatible implicit declaration of built-in function ‘printf’ [enabled by default]
      printf("unknown CHAN_TYPE %s\n", _mesa_lookup_enum_by_nr(CHAN_TYPE));
      ^
tnl/t_vertex_sse.c:599:3: warning: incompatible implicit declaration of built-in function ‘printf’ [enabled by default]
   printf("unknown a[%d].format %d\n", j, a->format);

x86/rtasm/x86sse.c: In function ‘x86_get_func’:
x86/rtasm/x86sse.c:1187:7: error: implicit declaration of function ‘printf’ [-Werror=implicit-function-declaration]
       printf("disassemble %p %p\n", p->store, p->csr);
       ^
x86/rtasm/x86sse.c:1187:7: warning: incompatible implicit declaration of built-in function ‘printf’ [enabled by default]

Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
 src/mesa/tnl/t_vertex_sse.c | 2 ++
 src/mesa/x86/rtasm/x86sse.c | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/src/mesa/tnl/t_vertex_sse.c b/src/mesa/tnl/t_vertex_sse.c
index 4b52f7d..7352b1f 100644
--- a/src/mesa/tnl/t_vertex_sse.c
+++ b/src/mesa/tnl/t_vertex_sse.c
@@ -25,6 +25,8 @@
  *    Keith Whitwell <keithw at vmware.com>
  */
 
+#include <stdio.h>
+
 #include "main/glheader.h"
 #include "main/context.h"
 #include "main/colormac.h"
diff --git a/src/mesa/x86/rtasm/x86sse.c b/src/mesa/x86/rtasm/x86sse.c
index c93faba..c9f52a4 100644
--- a/src/mesa/x86/rtasm/x86sse.c
+++ b/src/mesa/x86/rtasm/x86sse.c
@@ -1,6 +1,8 @@
 #ifdef USE_X86_ASM
 #if defined(__i386__) || defined(__386__)
 
+#include <stdio.h>
+
 #include "main/imports.h"
 #include "x86sse.h"
 
-- 
2.0.5



More information about the mesa-dev mailing list