Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 1 | From c7f3e2a8fe530beec6103cb9071ccc41458879aa Mon Sep 17 00:00:00 2001 |
| 2 | From: Tony Tascioglu <tony.tascioglu@windriver.com> |
| 3 | Date: Mon, 21 Jun 2021 12:34:22 -0400 |
| 4 | Subject: [PATCH] libyang: fix initial build errors |
| 5 | |
| 6 | This patch addresses build errors seen when integrating libyang as a |
| 7 | recipe. |
| 8 | |
| 9 | The call to pcre2-config has been commented out. *-config calls are |
| 10 | being replaced by pkgconfig, and we want to avoid the binary config |
| 11 | calls. This call can safely be discarded since it is used to check |
| 12 | the version of libpcre2 on the system, and all recent YP builds meet |
| 13 | the minimum required version (v10.21). |
| 14 | |
| 15 | There is a missing include statement for stdint.h in utests.h which |
| 16 | causes build problems. stdint.h is required to be imported by cmocka.h |
| 17 | prior to the cmocka file. Adding the stdint allows it to build the |
| 18 | tests correctly |
| 19 | |
| 20 | Upstream-Status: Pending |
| 21 | |
| 22 | Signed-off-by: Tony Tascioglu <tony.tascioglu@windriver.com> |
| 23 | --- |
| 24 | CMakeModules/FindPCRE2.cmake | 2 +- |
| 25 | tests/utests/utests.h | 1 + |
| 26 | 2 files changed, 2 insertions(+), 1 deletion(-) |
| 27 | |
| 28 | diff --git a/CMakeModules/FindPCRE2.cmake b/CMakeModules/FindPCRE2.cmake |
| 29 | index 8f60daa2..ad014f14 100644 |
| 30 | --- a/CMakeModules/FindPCRE2.cmake |
| 31 | +++ b/CMakeModules/FindPCRE2.cmake |
| 32 | @@ -12,7 +12,7 @@ FIND_PATH(PCRE2_INCLUDE_DIR pcre2.h) |
| 33 | FIND_LIBRARY(PCRE2_LIBRARY NAMES libpcre2.a pcre2-8) |
| 34 | |
| 35 | # Check required version |
| 36 | -execute_process(COMMAND pcre2-config --version OUTPUT_VARIABLE PCRE2_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE) |
| 37 | +# execute_process(COMMAND pcre2-config --version OUTPUT_VARIABLE PCRE2_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE) |
| 38 | |
| 39 | # Handle the QUIETLY and REQUIRED arguments and set PCRE_FOUND to TRUE if all listed variables are TRUE. |
| 40 | INCLUDE(FindPackageHandleStandardArgs) |
| 41 | diff --git a/tests/utests/utests.h b/tests/utests/utests.h |
| 42 | index 5bea0459..a256120c 100644 |
| 43 | --- a/tests/utests/utests.h |
| 44 | +++ b/tests/utests/utests.h |
| 45 | @@ -23,6 +23,7 @@ |
| 46 | #include <stddef.h> |
| 47 | #include <stdlib.h> |
| 48 | |
| 49 | +#include <stdint.h> |
| 50 | #include <cmocka.h> |
| 51 | |
| 52 | #include <string.h> |
| 53 | -- |
| 54 | 2.32.0 |
| 55 | |