3 @@ -33,6 +33,37 @@ extern __off64_t lseek64 __P ((int __fd,
8 +# include <features.h>
9 +# if __UCLIBC_MINOR__ <= 9 && __UCLIBC_SUBLEVEL__ <= 30
12 +void *memalign(size_t blocksize, size_t bytes);
13 +static inline int posix_memalign(void **memptr, size_t alignment, size_t size)
15 + if (alignment % sizeof(void *) != 0)
18 + *memptr = memalign(alignment, size);
19 + return (*memptr != NULL ? 0 : ENOMEM);
23 +char *strdup(const char *s);
24 +char *realpath(const char *path, char *resolved_path);
25 +static inline char *canonicalize_file_name(const char *path)
27 + char resolved[PATH_MAX] = { 0 };
29 + if (!realpath(path, resolved))
32 + return strdup(resolved);
35 +# endif /* __UCLIBC_MINOR__ <= 9 && __UCLIBC_SUBLEVEL__ <= 30 */
38 #include <sys/types.h>