[Bf-blender-cvs] [30249499c4e] blender2.8: Gawain: fix compilation on MSVC 2013

Mike Erwin noreply at git.blender.org
Sun Apr 16 17:01:42 CEST 2017


Commit: 30249499c4ed6e398bd43b0bfb219e6a7b79e522
Author: Mike Erwin
Date:   Sun Apr 16 11:00:59 2017 -0400
Branches: blender2.8
https://developer.blender.org/rB30249499c4ed6e398bd43b0bfb219e6a7b79e522

Gawain: fix compilation on MSVC 2013

attrib_binding.c uses NULL, so include stddef.
Also swapped stdlib for stddef in vertex_format.c, since it only needs NULL.

Not sure why MSVC 2017 and clang/Mac work without this...

Thanks to @youle for reporting!

===================================================================

M	intern/gawain/src/attrib_binding.c
M	intern/gawain/src/vertex_format.c

===================================================================

diff --git a/intern/gawain/src/attrib_binding.c b/intern/gawain/src/attrib_binding.c
index b174bc04f06..8a7fe3df66c 100644
--- a/intern/gawain/src/attrib_binding.c
+++ b/intern/gawain/src/attrib_binding.c
@@ -10,6 +10,7 @@
 // the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
 
 #include "attrib_binding.h"
+#include <stddef.h>
 
 #if MAX_VERTEX_ATTRIBS != 16
   #error "attrib binding code assumes MAX_VERTEX_ATTRIBS = 16"
diff --git a/intern/gawain/src/vertex_format.c b/intern/gawain/src/vertex_format.c
index 924cff42362..d00a143e780 100644
--- a/intern/gawain/src/vertex_format.c
+++ b/intern/gawain/src/vertex_format.c
@@ -10,7 +10,7 @@
 // the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
 
 #include "vertex_format.h"
-#include <stdlib.h>
+#include <stddef.h>
 #include <string.h>
 
 #define PACK_DEBUG 0




More information about the Bf-blender-cvs mailing list