From 77462ec0956eeb2714d74be3a64bd049985d6d0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torbj=C3=B6rn=20Svensson?= Date: Tue, 13 Aug 2024 11:01:07 +0200 Subject: [PATCH] Added missing bracers in native code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Contributed by STMicroelectronics Signed-off-by: Torbjörn Svensson --- .../os/linux/aarch64/libspawner.so | Bin 29552 -> 29552 bytes .../os/linux/ppc64le/libspawner.so | Bin 76016 -> 76016 bytes .../os/linux/x86_64/libspawner.so | Bin 28736 -> 28736 bytes .../os/macosx/aarch64/libspawner.jnilib | Bin 53998 -> 53998 bytes .../os/macosx/x86_64/libspawner.jnilib | Bin 20736 -> 20736 bytes .../native_src/unix/exec_unix.c | 12 ++++++++---- 6 files changed, 8 insertions(+), 4 deletions(-) diff --git a/core/org.eclipse.cdt.core.linux.aarch64/os/linux/aarch64/libspawner.so b/core/org.eclipse.cdt.core.linux.aarch64/os/linux/aarch64/libspawner.so index 8eaf3f18eae99f76117567a8d9448fbd59bea131..5abbeda17fddef6abc3605495ad9d0af053c75f6 100755 GIT binary patch delta 50 zcmV-20L}mK<^k~L0kEI}6x?RP_$7k`YmM47GnlOAE!{nG7_+ni+$sUXlaVZElLRvm Ivj{C{MtNu!M*si- delta 48 zcmV-00MGyM<^k~L0kEI}6gk!uMS`(JVS;uvv6rPlNJ_tl2D7vQ+$sS>laVZE0b{fI GEO$m6R}}34 diff --git a/core/org.eclipse.cdt.core.linux.ppc64le/os/linux/ppc64le/libspawner.so b/core/org.eclipse.cdt.core.linux.ppc64le/os/linux/ppc64le/libspawner.so index b472ea7639ecf67245f3e137cc0de344e5b0ea71..a064b0b15602fb7e9516f6723dbd1920c98b7b36 100755 GIT binary patch delta 48 zcmV-00MGyM(FE|(1hAk16exv{19zKoNPXSNn0ayePhD^*y|c6dq%{F{lUX-^0e`dE GHy80R>lQr# delta 48 zcmV-00MGyM(FE|(1hAk16n&)B--u^;T1xKHVy>Pxq;*#80kgCLq%{F@lUX-^0eiFA GHy80=ECs>B7~0PK`v+DsDC;@Vl11ezwd$VOK F+eIOA6+8d{ diff --git a/core/org.eclipse.cdt.core.macosx/os/macosx/aarch64/libspawner.jnilib b/core/org.eclipse.cdt.core.macosx/os/macosx/aarch64/libspawner.jnilib index 34c41c3623f96696b81f001eede5337f7aa846a8..d667decc2c70239389c83ea3cec6aeb27926ada5 100755 GIT binary patch delta 122 zcmV-=0EPeVr33Dz1F&EP5TRSAFN(A^T7jX#&tl!BM6+-O)ExoHlSLzM1n3(8GPAfN zcC8?u4){pmM~I%l54X$Zh??2>h>$ZwSpN2rpmq<$^xt`tPSGGBD^3xa+ioqY3W&1D cKdho-0ww?Tp3n?;T+O3zn{g+-vyRbV0V4`K{Qv*} delta 122 zcmV-=0EPeVr33Dz1F&EP5KJY=p|=h-iIfoDYqCn(*|Ts3)ExmxlSLzM1ZWR{QnR=t zcC8=-AZZY=MGjI!^{zizxu`aom@d~^DVABj-0B$@G Ar2qf` diff --git a/core/org.eclipse.cdt.core.native/native_src/unix/exec_unix.c b/core/org.eclipse.cdt.core.native/native_src/unix/exec_unix.c index 8afc663cdeb..129de40c99b 100644 --- a/core/org.eclipse.cdt.core.native/native_src/unix/exec_unix.c +++ b/core/org.eclipse.cdt.core.native/native_src/unix/exec_unix.c @@ -54,8 +54,9 @@ static int close_all_fds_using_parsing(unsigned int from_fd_inclusive) { #endif DIR *dirp = opendir(FD_DIR); - if (dirp == NULL) + if (dirp == NULL) { return -1; + } struct dirent *direntp; @@ -75,8 +76,9 @@ static int close_all_fds_using_parsing(unsigned int from_fd_inclusive) { static void close_all_fds_fallback(unsigned int from_fd_inclusive) { int fdlimit = sysconf(_SC_OPEN_MAX); - if (fdlimit == -1) + if (fdlimit == -1) { fdlimit = 65535; // arbitrary default, just in case + } for (int fd = from_fd_inclusive; fd < fdlimit; fd++) { close(fd); } @@ -84,10 +86,12 @@ static void close_all_fds_fallback(unsigned int from_fd_inclusive) { static void close_all_fds() { unsigned int from_fd = STDERR_FILENO + 1; - if (sys_close_range_wrapper(from_fd) == 0) + if (sys_close_range_wrapper(from_fd) == 0) { return; - if (close_all_fds_using_parsing(from_fd) == 0) + } + if (close_all_fds_using_parsing(from_fd) == 0) { return; + } close_all_fds_fallback(from_fd); }