This appears to work correctly under Solaris 2.3 and 2.4.

Instructions:

You need to do everything below as root.

1. Add an entry to /etc/name_to_sysnum for the sethostid system call.
For instance, I use the following line.
sethostid       177

Do not put any leading whitespace on the line in /etc/name_to_sysnum.

The important thing is to pick an unused syscall number. There
is also a limit on the number you can pick, which is determined
by the size of the sysent table. To find out what the limit is
you can use adb (only for 2.3, just be reasonable for Solaris 2.4)

adb -k /dev/ksyms /dev/mem
sysentsize/D
^D        #  i.e. control-D

It appears that in 2.5 you can use the NSYSCALL define in 
/usr/include/sys/systm.h

You should be able to pick any unused syscall number between 1 and the
number output by adb above minus 1. Alternatively just use an unused
number which is less than the largest number which occurs in
/etc/name_to_sysnum

After modifying /etc/name_to_sysnum you must reboot for the change
to take effect.

2. Look at the makefile and check that the location of the C compiler is
right for your system. You do NOT want to get /usr/ucb/cc. gcc should
be OK.

Also if you are running Solaris 2.3 or 2.4 be sure to uncomment the define
-DPRE_SOLARIS_2_5 in the makefile

3. Type
make load

This should load the sethostid call. 

4. Type 
make sid

This makes the program that allows you to modify the hostid for
a particular group.

e.g. Now you can modify the hostid for group 900 to be 23000000 by typing
./sid 0 23000000

6. You can unload the system call as follows.

Type
/usr/sbin/modinfo

 You'll get output which includes a line which looks something like
76 fc42d000   621 177   1  sethostid (kern_hostid v1.0)

To remove the module type
/usr/sbin/modunload -i 76
Replace 76 by the first number in the line output by modinfo.

7. If you like you can install sid and sethostid by typing
make install

If you do this, when you reboot, the sethostid module will be
automatically loaded when sethostid is called (i.e. when you run sid).

see ../run for a small utility for use with this.
