[Spice-devel] [spice-server] tests: Add G_PID_FORMAT to glib compat header

Eduardo Lima (Etrunko) etrunko at redhat.com
Fri Jul 6 13:34:15 UTC 2018


Acked-by: Eduardo Lima (Etrunko) <etrunko at redhat.com>

On 06/07/18 10:03, Christophe Fergeau wrote:
> G_PID_FORMAT was only added in glib 2.50.
> 
> Signed-off-by: Christophe Fergeau <cfergeau at redhat.com>
> ---
>  server/tests/replay.c           | 1 +
>  server/tests/test-glib-compat.h | 9 +++++++++
>  2 files changed, 10 insertions(+)
> 
> diff --git a/server/tests/replay.c b/server/tests/replay.c
> index 40fd10b69..bd9420b8c 100644
> --- a/server/tests/replay.c
> +++ b/server/tests/replay.c
> @@ -37,6 +37,7 @@
>  
>  #include <spice/macros.h>
>  #include "test-display-base.h"
> +#include "test-glib-compat.h"
>  #include <common/log.h>
>  
>  static SpiceCoreInterface *core;
> diff --git a/server/tests/test-glib-compat.h b/server/tests/test-glib-compat.h
> index bb0f601c5..eef074948 100644
> --- a/server/tests/test-glib-compat.h
> +++ b/server/tests/test-glib-compat.h
> @@ -68,4 +68,13 @@ g_test_assert_expected_messages_internal_no_warnings(const char *domain,
>  #define g_assert_false(cond) g_assert(!(cond))
>  #endif
>  
> +/* Added in glib 2.50 */
> +#ifndef G_PID_FORMAT
> +#ifdef G_OS_WIN32
> +#define G_PID_FORMAT "i"
> +#else
> +#define G_PID_FORMAT "p"
> +#endif /* G_OS_WIN32 */
> +#endif /* G_PID_FORMAT */
> +
>  #endif // TEST_GLIB_COMPAT_H_
> 


-- 
Eduardo de Barros Lima (Etrunko)
Software Engineer - RedHat
etrunko at redhat.com


More information about the Spice-devel mailing list