OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [libnetworking/] [libc/] [gethostname.c] - Blame information for rev 278

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*
2
 *  $Id: gethostname.c,v 1.2 2001-09-27 12:01:53 chris Exp $
3
 */
4
 
5
#include "config.h"
6
 
7
/*
8
 * Solaris doesn't include the gethostname call by default.
9
 */
10
#include <sys/utsname.h>
11
#include <sys/systeminfo.h>
12
 
13
#include <netdb.h>
14
 
15
/*
16
 * PUBLIC: #ifndef HAVE_GETHOSTNAME
17
 * PUBLIC: int gethostname __P((char *, int));
18
 * PUBLIC: #endif
19
 */
20
int
21
gethostname(host, len)
22
        char *host;
23
        int len;
24
{
25
        return (sysinfo(SI_HOSTNAME, host, len) == -1 ? -1 : 0);
26
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.