From b563d7b2e65a756e02c579f51e3ca0211f741050 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 3 Aug 2025 06:16:42 +0200 Subject: [PATCH] ucode: add missing return code checks for fchdir/chdir Fixes build issue on glibc Signed-off-by: Felix Fietkau --- ucode.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ucode.c b/ucode.c index a1b67f5..fdddab7 100644 --- a/ucode.c +++ b/ucode.c @@ -333,10 +333,12 @@ uc_netifd_start_process(uc_value_t *dir, uc_value_t *arg, uc_value_t *env, int * break; fallthrough; case UC_INTEGER: - fchdir(ucv_int64_get(dir)); + if (fchdir(ucv_int64_get(dir)) < 0) + exit(1); break; case UC_STRING: - chdir(ucv_string_get(dir)); + if (chdir(ucv_string_get(dir)) < 0) + exit(1); break; default: break; -- 2.30.2