9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] [PATCH] Fix fdclose conflict in drawterm
@ 2021-10-07 22:34 Christos Margiolis
  2021-10-08 12:46 ` cinap_lenrek
  0 siblings, 1 reply; 2+ messages in thread
From: Christos Margiolis @ 2021-10-07 22:34 UTC (permalink / raw)
  To: 9front

[-- Attachment #1: Type: text/plain, Size: 89 bytes --]

On FreeBSD fdclose(3) is 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] 2+ messages in thread

* Re: [9front] [PATCH] Fix fdclose conflict in drawterm
  2021-10-07 22:34 [9front] [PATCH] Fix fdclose conflict in drawterm Christos Margiolis
@ 2021-10-08 12:46 ` cinap_lenrek
  0 siblings, 0 replies; 2+ messages in thread
From: cinap_lenrek @ 2021-10-08 12:46 UTC (permalink / raw)
  To: 9front

applied. thanks!

--
cinap

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-08 12:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-07 22:34 [9front] [PATCH] Fix fdclose conflict in drawterm Christos Margiolis
2021-10-08 12:46 ` cinap_lenrek

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).