publicfile on solaris, issues with file/dev/tcp

adam morley <[email protected]> Thu, 5 Sep 2002 13:56:27 -0700
Newsgroups gmane.comp.djb.publicfile
Message-ID <[email protected]>
configure from publicfile seems to have a hardcoded major/minor number for 
file/dev/tcp:

if (mknod("file/dev/tcp",S_IFCHR | 0667,makedev(42,0)) == -1)

this doesn't work under solaris as:

$ ls -lL /dev/tcp
crw-rw-rw-   1 root     sys       42,  0 Jul  3 22:47 /dev/tcp

so i wrote a patch:

$ diff configure.c configure.c.orig 
166,168c166
<   struct stat dev_tcp;
<   stat("/dev/tcp", &dev_tcp);
<   if (mknod("file/dev/tcp",dev_tcp.st_mode,makedev(major(dev_tcp.st_rdev),minor(dev_tcp.st_rdev))) == -1)
---
>   if (mknod("file/dev/tcp",S_IFCHR | 0667,makedev(11,42)) == -1)

but I'm wondering if file/dev/tcp really needs to be 667 not 666 as it is on
solaris. (ie: is this a publicfile thing?)

and yes, I'm not checking the return of stat, but I figure if you've got it
then why check it.

thanks in advance, sorry if this is a rerun, but I couldn't find the archives

oh, and I didn't see an announce list for new version announcements --- do
such announcements go here?

adam