summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/atk/at-spi2-atk/0001-atk_test_util.h-add-missing-sys-time.h-include.patch
blob: f64e46eccd7cec7f5b8fb06f5286d06e0a93ff21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
From a8f9b2d36dc887216e8923047dc309435dd8b254 Mon Sep 17 00:00:00 2001
From: Tim Orling <timothy.t.orling@linux.intel.com>
Date: Fri, 28 Feb 2020 10:49:41 -0800
Subject: [PATCH] atk_test_util.h: add missing sys/time.h include
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

On centos-7, we see errors likei [1]:
../at-spi2-atk-2.34.1/tests/atk_test_util.c:75:10: error: unknown field ‘tv_sec’ specified in initializer
../at-spi2-atk-2.34.1/tests/atk_test_util.c:75:10: warning: excess elements in struct initializer [enabled by default]
../at-spi2-atk-2.34.1/tests/atk_test_util.c:75:10: warning: (near initialization for ‘timeout’) [enabled by default]
../at-spi2-atk-2.34.1/tests/atk_test_util.c:75:10: error: unknown field ‘tv_nsec’ specified in initializer
../at-spi2-atk-2.34.1/tests/atk_test_util.c:75:10: warning: excess elements in struct initializer [enabled by default]
../at-spi2-atk-2.34.1/tests/atk_test_util.c:75:10: warning: (near initialization for ‘timeout’) [enabled by default]
../at-spi2-atk-2.34.1/tests/atk_test_util.c:75:19: error: storage size of ‘timeout’ isn’t known
  struct timespec timeout = { .tv_sec = 0, .tv_nsec = 10 * 1000000 };
                  ^
../at-spi2-atk-2.34.1/tests/atk_test_util.c:90:5: warning: implicit declaration of function ‘nanosleep’ [-Wimplicit-function-declaration]
    nanosleep(&timeout, NULL);
    ^
../at-spi2-atk-2.34.1/tests/atk_test_util.c: In function ‘terminate_app’:
../at-spi2-atk-2.34.1/tests/atk_test_util.c:108:10: error: variable ‘timeout’ has initializer but incomplete type
  struct timespec timeout = { .tv_sec = 0, .tv_nsec = 10 * 1000000 };
         ^
../at-spi2-atk-2.34.1/tests/atk_test_util.c:108:10: error: unknown field ‘tv_sec’ specified in initializer
../at-spi2-atk-2.34.1/tests/atk_test_util.c:108:10: warning: excess elements in struct initializer [enabled by default]
../at-spi2-atk-2.34.1/tests/atk_test_util.c:108:10: warning: (near initialization for ‘timeout’) [enabled by default]
../at-spi2-atk-2.34.1/tests/atk_test_util.c:108:10: error: unknown field ‘tv_nsec’ specified in initializer
../at-spi2-atk-2.34.1/tests/atk_test_util.c:108:10: warning: excess elements in struct initializer [enabled by default]
../at-spi2-atk-2.34.1/tests/atk_test_util.c:108:10: warning: (near initialization for ‘timeout’) [enabled by default]
../at-spi2-atk-2.34.1/tests/atk_test_util.c:108:19: error: storage size of ‘timeout’ isn’t known
  struct timespec timeout = { .tv_sec = 0, .tv_nsec = 10 * 1000000 };

This is because of missing sys/time.h in tests/atk_test_util.h [2]

Thanks go to Khem Raj for pointing this out [3]

[1] http://errors.yoctoproject.org/Errors/Details/392974/
[2] https://gitlab.gnome.org/GNOME/at-spi2-atk/issues/14
[3] http://lists.openembedded.org/pipermail/openembedded-core/2020-February/293707.html

Upstream-Status: Pending

Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com>
---
 tests/atk_test_util.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/atk_test_util.h b/tests/atk_test_util.h
index d69e650..98a2c01 100644
--- a/tests/atk_test_util.h
+++ b/tests/atk_test_util.h
@@ -26,6 +26,7 @@
 
 #include <stdio.h>
 #include <unistd.h>
+#include <sys/time.h>
 #include <glib.h>
 #include <stdio.h>
 #include <stdlib.h>