mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-11 06:20:23 +02:00
(scm_gethostname): Set initial name length to 256 for
Solaris.
This commit is contained in:
parent
9a677c37c8
commit
a0f9c651b1
1 changed files with 3 additions and 1 deletions
|
@ -1506,7 +1506,9 @@ SCM_DEFINE (scm_gethostname, "gethostname", 0, 0, 0,
|
||||||
"Return the host name of the current processor.")
|
"Return the host name of the current processor.")
|
||||||
#define FUNC_NAME s_scm_gethostname
|
#define FUNC_NAME s_scm_gethostname
|
||||||
{
|
{
|
||||||
int len = 2, res;
|
/* 256 is for Solaris, under Linux ENAMETOOLONG is returned if not
|
||||||
|
large enough. */
|
||||||
|
int len = 256, res;
|
||||||
char *p = scm_must_malloc (len, "gethostname");
|
char *p = scm_must_malloc (len, "gethostname");
|
||||||
SCM name;
|
SCM name;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue