forked from espressif/esp-idf
Merge branch 'bugfix/fix-compile-error-on-64bit-linux' into 'master'
fix(vfs): fix compilation error on 64bit linux See merge request espressif/esp-idf!25483
This commit is contained in:
@ -276,7 +276,7 @@ static inline int semihosting_utime(const char *host_path, const struct utimbuf
|
|||||||
static inline int semihosting_stat(const char *host_path, struct stat *restrict statbuf)
|
static inline int semihosting_stat(const char *host_path, struct stat *restrict statbuf)
|
||||||
{
|
{
|
||||||
int host_errno = 0;
|
int host_errno = 0;
|
||||||
long args[] = {(long)host_path, strlen(host_path), (int)statbuf, 0};
|
long args[] = {(long)host_path, strlen(host_path), (long)statbuf, 0};
|
||||||
int ret = (int)semihosting_call(ESP_SEMIHOSTING_SYS_STAT, args, &host_errno);
|
int ret = (int)semihosting_call(ESP_SEMIHOSTING_SYS_STAT, args, &host_errno);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
errno = host_errno;
|
errno = host_errno;
|
||||||
@ -328,7 +328,7 @@ static inline int semihosting_opendir(const char *path, long offset)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int semihosting_readdir(int struct_dirent_ptr, long offset)
|
static inline int semihosting_readdir(long struct_dirent_ptr, long offset)
|
||||||
{
|
{
|
||||||
int host_errno = 0;
|
int host_errno = 0;
|
||||||
long args[] = {struct_dirent_ptr, offset, 0, 0};
|
long args[] = {struct_dirent_ptr, offset, 0, 0};
|
||||||
|
@ -377,7 +377,7 @@ static int vfs_semihost_readdir_r(void* ctx, DIR* dirp, struct dirent* entry, st
|
|||||||
}
|
}
|
||||||
|
|
||||||
ESP_LOGV(TAG, "%s: %s %ld", __func__, semihost_dirp->path, semihost_dirp->id);
|
ESP_LOGV(TAG, "%s: %s %ld", __func__, semihost_dirp->path, semihost_dirp->id);
|
||||||
int ret_fd = semihosting_readdir((int)entry, semihost_dirp->id);
|
int ret_fd = semihosting_readdir((long)entry, semihost_dirp->id);
|
||||||
if (ret_fd < 0) {
|
if (ret_fd < 0) {
|
||||||
if (errno == 0) { /* end of directory */
|
if (errno == 0) { /* end of directory */
|
||||||
*out_dirent = NULL;
|
*out_dirent = NULL;
|
||||||
|
Reference in New Issue
Block a user