Skip site navigation (1)Skip section navigation (2)
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>

next in thread | raw e-mail | index | archive | help
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.  Contact your
mail administrator for information about upgrading your reader to a version
that supports MIME.

------ =_NextPart_000_01BB2E1F.15DB2D50
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit

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/


------ =_NextPart_000_01BB2E1F.15DB2D50--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c=IT%a=_%p=stylo%l=STYLOSERVER960419183610BF006300>