mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-09 16:01:54 -09:00
stime() has been deprecated in glibc 2.31 [1] and replaced with clock_settime(). Let's replace the stime() function call used in BR2_PACKAGE_OPENJDK_JNI_TEST sources with clock_settime(). Apply the same change as busybox [2]. Make sure that timeToSet has been zeroed. With that fixed, the test "Call Native Library to Set System Time" succeed: [BRTEST# java -cp /usr/bin JniTest Test: Get JNI Version passed Test: Read Native String Constant passed Test: Write Java String to Native Library passed Test: Write Java Char Array to Native Library passed Test: Write String Member to Native Library passed Test: Set String Member from Native Library passed Test: Execeute Java Function from Native Library passed Test: Instantiate Java Class passed Test: Call Native Library to Set System Time passed [BRTEST# echo $? 0 The last external toolchain using a glibc 2.30 was the Bootlin aarch64--glibc--bleeding-edge-2020.02-2, so since then TestOpenJdk is broken. Fixes: https://gitlab.com/buildroot.org/buildroot/-/jobs/11176774851 [1] https://lists.gnu.org/archive/html/info-gnu/2020-02/msg00001.html [2] https://git.busybox.net/busybox/commit/?id=d3539be8f27b8cbfdfee460fe08299158f08bcd9 [3] https://toolchains.bootlin.com/downloads/releases/toolchains/aarch64/readmes/aarch64--glibc--bleeding-edge-2020.02-2.txt Signed-off-by: Romain Naour <romain.naour@smile.fr> Signed-off-by: Julien Olivain <ju.o@free.fr>