linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Edward Parrilla <eparrilla@comcast.net>
To: linux prg <linux-c-programming@vger.kernel.org>
Subject: passing host name from a structure.
Date: 06 Oct 2004 16:47:27 -0500	[thread overview]
Message-ID: <1097099245.4086.421.camel@localhost.localdomain> (raw)
In-Reply-To: <20041006104403.96723.qmail@web52903.mail.yahoo.com>

Hi Experts,
here a question for you, I have defined the following


#define bcopy(a,b,c) strncpy(b,a,c)


   struct sockaddr_in  sa;  /* socket addr. structure           */
   struct hostent * hp;     /* host entry                       */
   char *hostname;

hostname=argv[3];

hp=gethostbyname(hostname);  <-- get this error " warning: assignment
makes pointer from integer without a cast
"


bcopy((char *)hp->h_addr, (char *)&sa.sin_addr, hp->h_length);  <--
getting  dereferencing pointer to incomplete type

Any idea?
thanks in advance
Edward







  reply	other threads:[~2004-10-06 21:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-06 10:44 C language(asm construct) Ankit Jain
2004-10-06 21:47 ` Edward Parrilla [this message]
2004-10-06 22:44   ` passing host name from a structure Alphex Kaanoken
2004-10-07  2:02     ` Edward Parrilla
2004-10-07  5:03   ` Jeff Woods
2004-10-07  6:23     ` Edward Parrilla
2004-10-07  6:34     ` mapping client to port Edward Parrilla
2004-10-08 15:02 ` C language(asm construct) Suciu Flavius

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1097099245.4086.421.camel@localhost.localdomain \
    --to=eparrilla@comcast.net \
    --cc=linux-c-programming@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).