gethostid(3) Library Functions Manual gethostid(3) gethostid, sethostid - (libc -lc) #include long gethostid(void); int sethostid(long hostid); glibc ( feature_test_macros(7)): gethostid(): glibc 2.20: _DEFAULT_SOURCE || _XOPEN_SOURCE >= 500 glibc 2.19: _BSD_SOURCE || _XOPEN_SOURCE >= 500 sethostid(): glibc 2.21: _DEFAULT_SOURCE glibc 2.19 2.20: _DEFAULT_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE < 500) glibc 2.19 : _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE < 500) gethostid() sethostid() 32 . 32 UNIX . gethostbyname(3) . sethostid() . gethostid() 32 sethostid(). sethostid() 0 -1 errno . sethostid() : EACCES . EPERM . attributes(7). +----------------------+------------------------------------+----------+ | | | | +----------------------+------------------------------------+----------+ |gethostid() | | MT-Safe | | | | hostid | | | | env | | | | locale | +----------------------+------------------------------------+----------+ |sethostid() | | MT-Unsafe | | | | const:hostid | +----------------------+------------------------------------+----------+ glibc hostid /etc/hostid. ( glibc 2.2 /var/adm/hostid .) glibc gethostid() gethostname(2) gethostbyname_r(3) IPv4 IPv4. ( .) gethostid() POSIX.1-2008. sethostid() . 4.2BSD 4.4BSD. SVr4 POSIX.1-2001 gethostid() sethostid(). . hostid(1) gethostbyname(3) 3 . . : . 6.18 8 2026 gethostid(3)