Skip to content

Commit

Permalink
fix freebsd again
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrolcl committed Nov 7, 2024
1 parent b136790 commit 185b226
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arm-wt-22k/src/hostmm_ng.c
Original file line number Diff line number Diff line change
Expand Up @@ -322,13 +322,13 @@ EAS_RESULT EAS_HWDupHandle(EAS_HW_DATA_HANDLE hwInstData, EAS_FILE_HANDLE file,
*pDupFile = new_file;
return EAS_SUCCESS;
#else // __unix__ or __unix
int fd = fileno(file->handle);
int fd = fileno((FILE *) file->handle);
int dupfd = dup(fd);
int fdmode = fcntl(fd, F_GETFL) & O_ACCMODE;
char *mode = NULL;
if (fdmode & O_RDONLY != 0) {
if ((fdmode & O_RDONLY) != 0) {
mode = "r";
} else if (fdmode & O_WRONLY != 0) {
} else if ((fdmode & O_WRONLY) != 0) {
mode = "w";
} else {
mode = "w+";
Expand Down

0 comments on commit 185b226

Please sign in to comment.