diff options
author | Petr Vorel <pvorel@suse.cz> | 2019-04-14 14:21:42 +0200 |
---|---|---|
committer | Petr Vorel <pvorel@suse.cz> | 2019-04-15 15:20:16 +0200 |
commit | b6700b0717b985f4ec5dba3b041039aacae6fb13 (patch) | |
tree | f72a2512b0445248ffabe374c991c6e82efb2d19 /include | |
parent | d002ce1b3d48b8cea9ede43d1061ad4a29a432a2 (diff) |
tst_test.h: Include <string.h> to fix missing function declaration
This fixes build errors caused by -Werror-implicit-function-declaration
defined for android. There are many places, where missing <string.h> is
needed for memory and string related functions (see [1]). Including
headers here seems to be better than handling implicit function
declaration error every now and then.
There are few other headers missing, most notably <strings.h>. As this
header is deprecated, these should be replaced by these <string.h>.
Other headers (e.g. <stdlib.h>) should be manually added.
+ update copyright, use SPDX-License-Identifier.
[1] http://lists.linux.it/pipermail/ltp/2019-April/011655.html
Suggested-by: Zhengwang Ruan <ruanzw@xiaopeng.com>
Acked-by: Cyril Hrubis <chrubis@suse.cz>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
Diffstat (limited to 'include')
-rw-r--r-- | include/tst_test.h | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/include/tst_test.h b/include/tst_test.h index cf2447fe3..e4b935c45 100644 --- a/include/tst_test.h +++ b/include/tst_test.h @@ -1,18 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (c) 2015-2016 Cyril Hrubis <chrubis@suse.cz> - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * Copyright (c) Linux Test Project, 2016-2019 */ #ifndef TST_TEST_H__ @@ -24,6 +13,7 @@ #include <unistd.h> #include <limits.h> +#include <string.h> #include "tst_common.h" #include "tst_res_flags.h" |