• R/O
  • SSH

libctools: Commit

This library contains code that extends and simplifies different operations
for C language based programs.


Commit MetaInfo

Revisióna3b84232303f8358717dc48d19120c1324bae8aa (tree)
Tiempo2022-08-30 08:16:46
AutorSergey Gusarov <laborer2008@gmai...>
CommiterSergey Gusarov

Log Message

Fixed android NDK compile errors

Cambiar Resumen

Diferencia incremental

diff -r 4d9c05ed0b2b -r a3b84232303f include/ctools/std/unistd.h
--- a/include/ctools/std/unistd.h Tue Aug 30 01:59:36 2022 +0300
+++ b/include/ctools/std/unistd.h Tue Aug 30 02:16:46 2022 +0300
@@ -29,7 +29,11 @@
2929 * We could include unistd.h for symlink() but on some systems(i.e. Gentoo 2015)
3030 * symlink woudn't get linked
3131 */
32+# if defined(CT_OS_ANDROID)
33+extern int symlink(const char *, const char *);
34+# else
3235 extern CT_SHARED_API int symlink(const char* __from, const char* __to) __THROW __nonnull((1, 2)) __wur;
36+# endif
3337
3438 # endif
3539
diff -r 4d9c05ed0b2b -r a3b84232303f src/os/io.c
--- a/src/os/io.c Tue Aug 30 01:59:36 2022 +0300
+++ b/src/os/io.c Tue Aug 30 02:16:46 2022 +0300
@@ -36,7 +36,11 @@
3636 * We could include stdlib.h for realpath() but on some systems(i.e. Ubuntu 14.04)
3737 * stdlib.h(->features.h) undefines everything
3838 */
39+# if defined(CT_OS_ANDROID)
40+extern char * realpath(const char *path, char *resolved);
41+# else
3942 extern char* realpath(const char* __restrict __name, char* __restrict __resolved) __THROW __wur;
43+# endif
4044
4145 char* getAbsolutePath(const char* const path, char* resolvedPath, const size_t bufferSize) CT_NOEXCEPT
4246 {
Show on old repository browser