Date: Fri, 19 Apr 1996 11:22:37 -0700 (PDT) From: Doug White <dwhite@riley-net170-164.uoregon.edu> To: Angelo Turetta <ATuretta@stylo.it> Cc: "'freebsd-questions'" <freebsd-questions@freebsd.org> Subject: Re: How can I use gethostname() in snake_saver ?? Message-ID: <Pine.BSF.3.91.960419112206.25922C@riley-net170-164.uoregon.edu> In-Reply-To: <c=IT%a=_%p=stylo%l=STYLOSERVER960419183610BF006300@styloserver.stylo.it>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 19 Apr 1996, Angelo Turetta wrote: > I'm learning unix programming, so I'm obviously missing some very basic > information: please, be patient :-) I'm not either, I'm just looking at the man page :-) > > 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 :-) ???? Did you #include <unistd.h>? Doug White | University of Oregon Internet: dwhite@resnet.uoregon.edu | Residence Networking Assistant http://gladstone.uoregon.edu/~dwhite | Computer Science Major
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.91.960419112206.25922C>