how does gethostname() work/depend on? - Linux

This is a discussion on how does gethostname() work/depend on? - Linux ; hi all, when i run program on the target host, i find the gethostname(hostname) get none, i dont know gethostname(hostname) how to work, and which files depend on? BTW:i find there resolv.conf and hosts...

+ Reply to Thread
Results 1 to 2 of 2

Thread: how does gethostname() work/depend on?

  1. how does gethostname() work/depend on?

    hi all, when i run program on the target host, i find the gethostname(hostname) get none, i dont know gethostname(hostname) how to work, and which files depend on?

    BTW:i find there resolv.conf and hosts


  2. Re: how does gethostname() work/depend on?

    freegnu wrote:
    > hi all, when i run program on the target host, i find the
    > gethostname(hostname) get none, i dont know gethostname(hostname) how to
    > work, and which files depend on?
    >
    > BTW:i find there resolv.conf and hosts

    My system (Fedora Core 3, gcc 3.4.4) doesn't have a
    gethostname (char *)
    function. It has
    gethostname (char *, size_t)
    If you post the minimum compilable program demonstrating your problem,
    perhaps someone could help you.

+ Reply to Thread