util: use the return value of gethosid() as fallback, not the address of the function

Yikes!
This commit is contained in:
Lennart Poettering 2012-05-15 14:12:38 +02:00
parent 10f146ddc8
commit bea524cb7a

View file

@ -2749,7 +2749,7 @@ char *pa_machine_id(void) {
#ifndef OS_IS_WIN32 #ifndef OS_IS_WIN32
/* If no hostname was set we use the POSIX hostid. It's usually /* If no hostname was set we use the POSIX hostid. It's usually
* the IPv4 address. Might not be that stable. */ * the IPv4 address. Might not be that stable. */
return pa_sprintf_malloc("%08lx", (unsigned long) gethostid); return pa_sprintf_malloc("%08lx", (unsigned long) gethostid());
#else #else
return NULL; return NULL;
#endif #endif