From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 25204 invoked from network); 8 Oct 2021 00:47:05 -0000 Received: from 4ess.inri.net (216.126.196.42) by inbox.vuxu.org with ESMTPUTF8; 8 Oct 2021 00:47:05 -0000 Received: from 95.179.159.8 ([95.179.159.8]) by 4ess; Thu Oct 7 18:08:16 -0400 2021 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=default; bh=5pTsp6kt5BcN DJoLdr8T5k1TSe0ysxS0+Vs+7d5VTMA=; h=subject:to:from:date; d=margiolis.net; b=W+CUG3qBJv7mflKEi4xHX0Rz2HuaV0vydhjfdiwQuzu8VuADYYC nAf5LvBBSpSSyzI1GfXZdAPQfv13N1BIAUL7+opgII7LDFf4LxN+qXbGMXY6bSVHLyoGUU mURsrmdj99DKh+qo2JmcSC2+B/bHfzEhP9dwmOsEhxVhz9P38I= Received: from pleb (athedsl-4393389.home.otenet.gr [79.130.121.157]) by christos (OpenSMTPD) with ESMTPSA id d31bf23f (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO) for <9front@9front.org>; Thu, 7 Oct 2021 22:08:00 +0000 (UTC) Date: Fri, 8 Oct 2021 01:07:51 +0300 From: Christos Margiolis To: 9front@9front.org Message-ID: <20211007220751.gsaua5jh5swtrg5h@pleb> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="3alods4m5h6mrmzb" Content-Disposition: inline List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: immutable high-performance markup out-scaling element wrapper Subject: [9front] [PATCH] Fix drawterm build failure on FreeBSD Reply-To: 9front@9front.org Precedence: bulk --3alods4m5h6mrmzb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 --3alods4m5h6mrmzb Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="9front_sysfile.diff" 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); } --3alods4m5h6mrmzb--