Subject: pkg/36877: net/nload builds, but doesn't work on solaris 10 (workaround)
To: None <email@example.com, firstname.lastname@example.org,>
From: None <email@example.com>
Date: 09/01/2007 10:35:00
>Synopsis: net/nload builds, but doesn't work on solaris 10 (workaround)
>Arrival-Date: Sat Sep 01 10:35:00 +0000 2007
>Originator: Thomas Backman
>Release: None, Solaris 10, pkgsrc-current
SunOS *.org 5.10 Generic_118855-33 i86pc i386 i86pc
The package builds just fine, but doesn't work. When it's started, you get a blank screen and nothing happens until you press Ctrl+C and return to a garbled terminal.
Install net/nload on Solaris (10 in my case), run "nload".
Edit src/main.cpp, and replace
while( ( key = getch() ) != ERR )
while( ( key = getch() ) != -1 )
Should be at line 314.
Then compile, and it runs.
The problem seems to be that both ncurses and Solaris(? or something else) defines ERR, to different values. nload expects it to be -1, though, and the loop freezes while waiting for getch() to return ERR.
The same problem exists in net/rtorrent, with the very same fix. I have no idea why, though. Also, this is my very first PR ever, so be gentle. :-)