Fix minor incompatibilities with RHEL6

Include missing pthread header.
Avoid undeclared functions in test-glib-compat.c including
proper/correct header.
Define missing g_assert_true and g_assert_false.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
This commit is contained in:
Frediano Ziglio 2017-03-30 10:27:46 +01:00
parent 0457d00f75
commit 7d86223e21
3 changed files with 10 additions and 1 deletions

View File

@ -20,7 +20,9 @@
#endif
#include <inttypes.h>
#include <pthread.h>
#include <glib.h>
#include "red-common.h"
#include "memslot.h"
#include "red-parse-qxl.h"

View File

@ -18,7 +18,7 @@
#include <config.h>
#include "glib-compat.h"
#include "test-glib-compat.h"
#if !GLIB_CHECK_VERSION(2, 34, 0)

View File

@ -39,4 +39,11 @@ void g_test_expect_message(const gchar *log_domain, GLogLevelFlags log_level,
#define g_assert_null(ptr) g_assert((ptr) == NULL)
#endif
#ifndef g_assert_true
#define g_assert_true g_assert
#endif
#ifndef g_assert_false
#define g_assert_false(cond) g_assert(!(cond))
#endif
#endif // TEST_GLIB_COMPAT_H_