Date: Fri, 19 Apr 1996 18:36:07 +0200 From: Angelo Turetta <ATuretta@stylo.it> To: "'freebsd-questions'" <freebsd-questions@freebsd.org> Subject: How can I use gethostname() in snake_saver ?? Message-ID: <c=IT%a=_%p=stylo%l=STYLOSERVER960419183610BF006300@styloserver.stylo.it>
index | next in thread | raw e-mail
I'm learning unix programming, so I'm obviously missing some very basic information: please, be patient :-) I've modified snake_saver.c to make it use the host name as its 'snake' message. The hack is really simple: in saver_load() I use gethostname(3) to fill a static array that is later used by snake_saver() instead of the local array 'saves'. When I try to install the screen saver using modload(8), I get: /usr/src/lkm/syscons/snake> modload -u -o /tmp/saver_mod -e saver_init -q /lkm/snake_saver_mod.o /lkm/snake_saver_mod.o: Undefined symbol `_gethostname' referenced from text segment modload: /usr/bin/ld: return code 1 Is it only some -lxxxx missing or am I pretending too much :-) ???? Thanks for any help. Angelo. ----------------------------------------------------------------- Angelo Turetta mailto:aturetta@stylo.it Stylo Multimedia - Bologna - Italy http://www.stylo.it/help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c=IT%a=_%p=stylo%l=STYLOSERVER960419183610BF006300>
