[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

gethostname hack



Hey all,

rdesktop uses gethostname to figure out the hostname, but gethostname
under linux returns an error when the hostname is longer than the buffer.
This hack gives gethostname a 64 char buffer and then strips the first 16
chars or upto the first '.' and puts the result in hostname[16].

cya

Hugo

--------------------------------------------------------------
"That i'm paranoid doesn't mean they aren't out to get me!"
--------------------------------------------------------------
Hugo Trippaers (HT2-6BONE)      ISION Internet BV
System Engineer (RHCE)          http://www.ision.nl
spark@ision.nl

hostname-patch.bz2