Stuart Henderson <[email protected]> writes:
> On 2015/12/21 17:21, Jonathan Gray wrote:
>> Waffle is another library along the lines of GLUT that provides a way to
>> select a windowing system and api for OpenGL.
>>
>> This is primarily of interest for using the piglit OpenGL tests as
>> Waffle is required for testing OpenGL ES.
>
> This fails on i386 (and presumably other 32-bit arch), ports/devel/cmocka
> already has a patch for this situation, but the file in the version of
> cmocka that is bundled with waffle is a bit different, I don't really
> have time to unpick it at the moment.
Here's a backport of the cmocka fix (modulo sys/stdin.h -> stdint.h).
Builds fine on i386.
(That cmocka header is damn ugly...)
$OpenBSD$
Avoid a conflicting typedef on 32-bit arch.
--- third_party/cmocka/include/cmocka.h.orig Mon Dec 28 01:20:04 2015
+++ third_party/cmocka/include/cmocka.h Mon Dec 28 01:23:28 2015
@@ -81,6 +81,9 @@ int __stdcall IsDebuggerPresent();
#define cast_to_largest_integral_type(value) \
((LargestIntegralType)((size_t)(value)))
+#if defined(__OpenBSD__)
+#include <stdint.h>
+#else
/* Smallest integral type capable of holding a pointer. */
#if !defined(_UINTPTR_T) && !defined(_UINTPTR_T_DEFINED)
# if defined(_WIN32)
@@ -109,6 +112,7 @@ int __stdcall IsDebuggerPresent();
# define _UINTPTR_T
# define _UINTPTR_T_DEFINED
#endif /* !defined(_UINTPTR_T) || !defined(_UINTPTR_T_DEFINED) */
+#endif /* !defined(__OpenBSD__) */
/* Perform an unsigned cast to uintptr_t. */
#define cast_to_pointer_integral_type(value) \
--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE