🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #13224

Re: Problem with INN 1.5 msync() on BSD/OS 2.1

#13224
From: Evan Champion
Date: Thu, 12 Dec 1996 00:00
45 lines
2201 bytes
The Caretaker wrote:
> For BSD/OS, someone earlier suggested that in config.data set:
> 
> MSYNC_3_ARG             DO
> 
> ...which I guess would work, but what I did instead in innd/icd.c change:
> 
>         if (msync(ICDactpointer, 0) < 0) {
> to:
> 
>         if (msync(ICDactpointer, ICDactsize) < 0) {

The real problem is that the BSD/OS 2.1 msync() is broken for the case
when the second argument is 0.

A fix from BSDI follows.  This will let you use INN 1.5 as shipped. 
Note: this would make a good entry into the FAQ since BSDI did not want
to make up a separate patch for it, but they did give me permission to
distribute it on my own.  This patch has already been made to the BSD/OS
3.0 source tree.

Evan

*** sys/vm/vm_mmap.c    1996/07/30 09:54:41     2.9
--- sys/vm/vm_mmap.c    1996/10/21 20:52:55
***************
*** 387,393 ****
                vm_map_lock_read(map);
                rv = vm_map_lookup_entry(map, addr, &entry);
                vm_map_unlock_read(map);
!               if (rv)
                        return (EINVAL);
                addr = entry->start;
                size = entry->end - entry->start;
--- 387,393 ----
                vm_map_lock_read(map);
                rv = vm_map_lookup_entry(map, addr, &entry);
                vm_map_unlock_read(map);
!               if (rv == FALSE)
                        return (EINVAL);
                addr = entry->start;
                size = entry->end - entry->start;

Technical Details
Message-ID: <32B04260.7E2C@synapse.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
References: <58ncoc$ph@valhalla.comshare.com> <58ovt2$m4d$1@opihi.aloha.com>

Show Full Headers
Complete Article Headers
Message-ID: <32B04260.7E2C@synapse.net>
Subject: Re: Problem with INN 1.5 msync() on BSD/OS 2.1
Date: Thu, 12 Dec 1996 00:00:00 +0000
From: Evan Champion <evanc@synapse.net>
References: <58ncoc$ph@valhalla.comshare.com> <58ovt2$m4d$1@opihi.aloha.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
X-Deja-AN: 203733983
Content-type: text/plain; charset=us-ascii
Organization: Synapse Internet <www.synapse.net>
Mime-version: 1.0
Newsgroups: news.software.nntp
X-mailer: Mozilla 3.01 (WinNT; I)