#include #include long gethostid() { FILE *f; long rv = 0; f = fopen("/etc/hostid", "reb"); if (f) { if (fread(&rv, 4, 1, f) == 0) { rv = 0; } fclose(f); } return rv; }