fix for gethostname call

This commit is contained in:
Mike Dirolf 2009-12-02 11:10:30 -05:00
parent 20c8082e90
commit 6de555f19c
1 changed files with 1 additions and 1 deletions

View File

@ -771,7 +771,7 @@ static VALUE objectid_generate(VALUE self)
t = htonl(time(NULL));
MEMCPY(&oid_bytes, &t, unsigned char, 4);
if (gethostname(&hostname, MAX_HOSTNAME_LENGTH) != 0) {
if (gethostname(hostname, MAX_HOSTNAME_LENGTH) != 0) {
rb_raise(rb_eRuntimeError, "failed to get hostname");
}
digest = rb_funcall(DigestMD5, rb_intern("digest"), 1, rb_str_new2(hostname));