From ac609365f6a495c4f2273686a769fae0a3176dcf Mon Sep 17 00:00:00 2001 From: Sabareesh-Kumar-Anandan <59681634+Sabareesh-Kumar-Anandan@users.noreply.github.com> Date: Wed, 25 Nov 2020 14:40:53 +0530 Subject: [PATCH] [libyang] Adding LFS support for arm32 (#6018) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In the emulated armhf environment, the function readdir()returns NULL on a ext4 file system directory. When running the libyang test cases, it will require to load the plugins from the files (such as metadata.so), because the readdir() is failing, the plugins can’t be loaded in the emulated armhf environment, so it causes libyang test error. This error is a combination of the following reasons. • Emulation of a 32-bit target from a 64-bit host –> qemu from x86_64 to armhf • Glibc version > 2.27 – Debian buster is using glibc 2.28 Signed-off-by: Sabareesh Kumar Anandan --- src/libyang/patch/large_file_support_arm32.patch | 11 +++++++++++ src/libyang/patch/series | 1 + 2 files changed, 12 insertions(+) create mode 100644 src/libyang/patch/large_file_support_arm32.patch diff --git a/src/libyang/patch/large_file_support_arm32.patch b/src/libyang/patch/large_file_support_arm32.patch new file mode 100644 index 0000000000..e3fb2b7390 --- /dev/null +++ b/src/libyang/patch/large_file_support_arm32.patch @@ -0,0 +1,11 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8635ba1..39f0741 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -436,3 +436,6 @@ endif(ENABLE_BUILD_FUZZ_TARGETS) + if(GEN_LANGUAGE_BINDINGS AND GEN_CPP_BINDINGS) + add_subdirectory(swig) + endif() ++ ++#Enable large file support for 32-bit arch ++add_definitions(-D_FILE_OFFSET_BITS=64) diff --git a/src/libyang/patch/series b/src/libyang/patch/series index 773245e4ee..c2bbcf1330 100644 --- a/src/libyang/patch/series +++ b/src/libyang/patch/series @@ -1,2 +1,3 @@ libyang.patch swig.patch +large_file_support_arm32.patch