Skip to content

Commit

Permalink
[libyang] Adding LFS support for arm32 (sonic-net#6018)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Sabareesh-Kumar-Anandan authored and santhosh-kt committed Feb 25, 2021
1 parent a1cc9dd commit 9ce1d90
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/libyang/patch/large_file_support_arm32.patch
Original file line number Diff line number Diff line change
@@ -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)
1 change: 1 addition & 0 deletions src/libyang/patch/series
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
libyang.patch
swig.patch
large_file_support_arm32.patch

0 comments on commit 9ce1d90

Please sign in to comment.