From 2cfefc25ccffa4a7fc83cff1f6aa58cbf7c247c0 Mon Sep 17 00:00:00 2001 From: apio Date: Thu, 3 Nov 2022 16:52:41 +0100 Subject: [PATCH] libc: Stub out rename() --- libs/libc/include/stdio.h | 3 ++- libs/libc/src/stdio.cpp | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/libs/libc/include/stdio.h b/libs/libc/include/stdio.h index 6157c1b3..15312f51 100644 --- a/libs/libc/include/stdio.h +++ b/libs/libc/include/stdio.h @@ -163,7 +163,8 @@ extern "C" * of the last error encountered during a call to a system or library function. */ void perror(const char* str); - int remove(const char* pathname); // Not implemented. + int remove(const char* pathname); // Not implemented. + int rename(const char* oldpath, const char* newpath); // Not implemented. FILE* tmpfile(void); // Not implemented. diff --git a/libs/libc/src/stdio.cpp b/libs/libc/src/stdio.cpp index 737d0cca..ac61cd53 100644 --- a/libs/libc/src/stdio.cpp +++ b/libs/libc/src/stdio.cpp @@ -64,6 +64,11 @@ extern "C" NOT_IMPLEMENTED("fscanf"); } + int rename(const char*, const char*) + { + NOT_IMPLEMENTED("rename"); + } + FILE* tmpfile() { errno = ENOTSUP;