* [9front] [PATCH] Fix drawterm build failure on FreeBSD
@ 2021-10-07 22:07 Christos Margiolis
0 siblings, 0 replies; only message in thread
From: Christos Margiolis @ 2021-10-07 22:07 UTC (permalink / raw)
To: 9front
[-- Attachment #1: Type: text/plain, Size: 143 bytes --]
Build was failing due to a conflict with FreeBSD's fdclose(3). On
FreeBSD it's declared as:
int
fdclose(FILE *stream, int *fdp);
--
Christos
[-- Attachment #2: 9front_sysfile.diff --]
[-- Type: text/x-diff, Size: 608 bytes --]
diff --git a/kern/sysfile.c b/kern/sysfile.c
index 04af4e3..413c0eb 100644
--- a/kern/sysfile.c
+++ b/kern/sysfile.c
@@ -293,7 +293,7 @@ _sysopen(char *name, int mode)
}
static void
-fdclose(int fd, int flag)
+_fdclose(int fd, int flag)
{
int i;
Chan *c;
@@ -325,7 +325,7 @@ long
_sysclose(int fd)
{
fdtochan(fd, -1, 0, 0);
- fdclose(fd, 0);
+ _fdclose(fd, 0);
return 0;
}
@@ -698,7 +698,7 @@ bindmount(int ismount, int fd, int afd, char* arg0, char* arg1, int flag, char*
poperror();
cclose(c0);
if(ismount){
- fdclose(fd, 0);
+ _fdclose(fd, 0);
poperror();
free(spec);
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-10-08 0:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-07 22:07 [9front] [PATCH] Fix drawterm build failure on FreeBSD Christos Margiolis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).