Skip to content

Commit

Permalink
target/esp_semihosting: fix wsl mingw64 build error
Browse files Browse the repository at this point in the history
  • Loading branch information
erhankur committed Nov 26, 2024
1 parent 2ee1b8b commit a139429
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/target/espressif/esp_semihosting.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#if IS_MINGW
#define mkdir(fname, mode) mkdir(fname)
#define fsync(fd) FlushFileBuffers((HANDLE)fd)
#define fsync(fd) FlushFileBuffers((HANDLE)(uintptr_t)(fd))
#define link(src, dest) CreateHardLink(dest, src, NULL)
#endif

Expand Down Expand Up @@ -726,10 +726,10 @@ int esp_semihosting_common(struct target *target)
}
retval = semihosting_read_fields(target, 1, fields);
if (retval == ERROR_OK) {
int fd = semihosting_get_field(target, 0, fields);
uint64_t fd = semihosting_get_field(target, 0, fields);
semihosting->result = fsync(fd);
semihosting->sys_errno = errno;
LOG_DEBUG("fsync('%d')=%" PRId64, fd, semihosting->result);
LOG_DEBUG("fsync('%'" PRIu64 "')=%" PRId64, fd, semihosting->result);
}
break;

Expand Down

0 comments on commit a139429

Please sign in to comment.