fit musl lib for arm boards.
This commit is contained in:
@@ -357,7 +357,7 @@ static int FatfsStat(struct MountPoint *mp, const char *path,
|
||||
FRESULT res;
|
||||
FILINFO fno;
|
||||
char *ff_path;
|
||||
struct tm tm;
|
||||
// struct tm tm;
|
||||
int year, mon, day, hour, min, sec;
|
||||
WORD tmp;
|
||||
|
||||
@@ -465,7 +465,7 @@ DWORD GetFatTime(void)
|
||||
{
|
||||
DWORD fat_time = 0;
|
||||
|
||||
#ifdef LIB
|
||||
#if defined LIB && !defined(LIB_MUSLLIB)
|
||||
time_t now;
|
||||
struct tm *p_tm;
|
||||
struct tm tm_now;
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
#ifndef _INC_IOT_VFS_H_
|
||||
#define _INC_IOT_VFS_H_
|
||||
|
||||
#include <xizi.h>
|
||||
#include <bus.h>
|
||||
|
||||
#define MAX_FILE_NAME 255
|
||||
|
||||
@@ -25,14 +25,16 @@ int read(int fd, void *buf, size_t len);
|
||||
int write(int fd, const void *buf, size_t len);
|
||||
#endif
|
||||
|
||||
int open(const char *path, int flags, ...);
|
||||
|
||||
|
||||
int open(const char* path, int flags, ...);
|
||||
int close(int fd);
|
||||
int ioctl(int fd, int cmd, void *args);
|
||||
int ioctl(int fd, int cmd, ...);
|
||||
off_t lseek(int fd, off_t offset, int whence);
|
||||
int rename(const char *from, const char *to);
|
||||
int unlink(const char *path);
|
||||
int stat(const char *path, struct stat *buf);
|
||||
int fstat(int fd, struct stat *buf);
|
||||
// int stat(const char *path, struct stat *buf);
|
||||
// int fstat(int fd, struct stat *buf);
|
||||
int fsync(int fd);
|
||||
int ftruncate(int fd, off_t length);
|
||||
|
||||
|
||||
@@ -573,7 +573,8 @@ int write(int fd, const void *buf, size_t len)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ioctl(int fd, int cmd, void *args)
|
||||
#ifndef LIB_MUSLLIB
|
||||
int ioctl(int fd, int cmd, ...)
|
||||
{
|
||||
int ret;
|
||||
struct FileDescriptor *fdp;
|
||||
@@ -589,7 +590,10 @@ int ioctl(int fd, int cmd, void *args)
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret = fdp->mntp->fs->ioctl(fdp, cmd, args);
|
||||
va_list ap;
|
||||
va_start(ap, cmd);
|
||||
ret = fdp->mntp->fs->ioctl(fdp, cmd, (void*)va_arg(ap, int));
|
||||
va_end(ap);
|
||||
if (ret < 0) {
|
||||
SYS_ERR("%s: ioctl file failed\n", __func__);
|
||||
KUpdateExstatus(ret);
|
||||
@@ -598,6 +602,7 @@ int ioctl(int fd, int cmd, void *args)
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
off_t lseek(int fd, off_t offset, int whence)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user