termux-packages/packages/cfengine/libpromises-patches-copy-no...

25 lines
641 B
Diff

diff --git a/libpromises/patches.c b/libpromises/patches.c
index 40407eb1f..9bc1fadbd 100644
--- a/libpromises/patches.c
+++ b/libpromises/patches.c
@@ -34,6 +34,10 @@
#include <audit.h>
+#ifdef __TERMUX__
+#include <file_lib.h>
+#endif
+
static char *cf_format_strtimestamp(struct tm *tm, char *buf);
/*********************************************************/
@@ -193,6 +197,8 @@ bool LinkOrCopy(const char *from, const char *to, int sym)
return false;
}
+#elif __TERMUX__ // link() not supported on android/termux so use rename() instead
+ return File_Copy(from, to);
#else /* !__MINGW32__ */
if (sym)