Mesa (master): gallivm: Include stddef.h before the LLVM C++ headers.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Mon Nov 14 10:42:32 UTC 2011


Module: Mesa
Branch: master
Commit: 34930facfe11ef6e322c276295ddf884d36de11c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=34930facfe11ef6e322c276295ddf884d36de11c

Author: José Fonseca <jfonseca at vmware.com>
Date:   Tue Nov  8 17:09:37 2011 +0000

gallivm: Include stddef.h before the LLVM C++ headers.

Necessary with build against LLVM 2.6, with recent gcc, as LLVM headers
depend on ptrdiff_t but don't properly include stddef.h

---

 src/gallium/auxiliary/gallivm/lp_bld_debug.cpp |    2 ++
 src/gallium/auxiliary/gallivm/lp_bld_misc.cpp  |    2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
index b685c08..62825a2 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
@@ -25,6 +25,8 @@
  *
  **************************************************************************/
 
+#include <stddef.h>
+
 #include <llvm-c/Core.h>
 #include <llvm/Target/TargetMachine.h>
 #include <llvm/Target/TargetInstrInfo.h>
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
index 85fabc5..222241a 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
@@ -34,6 +34,8 @@
 #define __STDC_CONSTANT_MACROS
 #endif
 
+#include <stddef.h>
+
 #include <llvm-c/Core.h>
 #include <llvm-c/ExecutionEngine.h>
 #include <llvm/Target/TargetOptions.h>




More information about the mesa-commit mailing list