From 185b22616d15a8057e621f469c6eead8d69c342b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20L=C3=B3pez-Cabanillas?= Date: Thu, 7 Nov 2024 22:51:14 +0100 Subject: [PATCH] fix freebsd again --- arm-wt-22k/src/hostmm_ng.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arm-wt-22k/src/hostmm_ng.c b/arm-wt-22k/src/hostmm_ng.c index 044dcdae..90d22538 100644 --- a/arm-wt-22k/src/hostmm_ng.c +++ b/arm-wt-22k/src/hostmm_ng.c @@ -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+";