diff options
author | Martin Grabmüller <mgrabmue@cs.tu-berlin.de> | 2001-03-09 12:09:17 +0000 |
---|---|---|
committer | Martin Grabmüller <mgrabmue@cs.tu-berlin.de> | 2001-03-09 12:09:17 +0000 |
commit | a0f9c651b1fbd70d6841669c04e58c1f00d067d4 (patch) | |
tree | 707346a35bfb26de0df70219754daeb49a2c8a69 | |
parent | 9a677c37c85fb03466feccfb4bcf9674884da393 (diff) | |
download | guile-a0f9c651b1fbd70d6841669c04e58c1f00d067d4.tar.gz |
(scm_gethostname): Set initial name length to 256 for
Solaris.
-rw-r--r-- | libguile/posix.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libguile/posix.c b/libguile/posix.c index 6f4bad800..861791864 100644 --- a/libguile/posix.c +++ b/libguile/posix.c @@ -1506,7 +1506,9 @@ SCM_DEFINE (scm_gethostname, "gethostname", 0, 0, 0, "Return the host name of the current processor.") #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"); SCM name; |