Subject: Compile Question
To: macbsd <port-mac68k@NetBSD.ORG>
From: None <cruller@unicom.net>
List: port-mac68k
Date: 08/18/1999 14:33:11
hola,

I'm trying to compile a port scanner on netbsd 1.3.2 to test for holes
in my security.  When I complile I get these errors.

$ gcc scanlogd.c
scanlogd.c:9: warning: Header file /usr/include/unistd.h exists, but is
not readable
scanlogd.c:9: unistd.h: Permission denied
scanlogd.c:13: warning: Header file /usr/include/time.h exists, but is
not readable
scanlogd.c:13: time.h: Permission denied
scanlogd.c:14: syslog.h: No such file or directory

Now all these errors point to .h files in /usr/include where 2 of the
three reside.  These .h files are also in /usr/include/sys.  Reading
some news articals from around the globe I see the diff is
/usr/include/foo.h are hardware specific and /usr/include/sys/foo.h is a
generic include file.  Do I have that right? The permissions on these
files are like this:
c-----S---   1 768   1792    208, 0 Nov 10  2019 time.h
              ^^^^^^^^^^^^^^^^^^<----this is puzzling


Now, If I point these three files to /usr/include/sys (sys/foo.h) in the
scanlogd.c file I get one error when I compile as a user:

$ gcc scanlogd.c
In file included from scanlogd.c:13:
/usr/include/sys/time.h:168: warning: Header file /usr/include/time.h
exists, but is not readable
/usr/include/sys/time.h:168: time.h: Permission denied

The permission on this file is:
-r--r--r--   1 root  wheel   6370 Dec 18  1997 time.h
and when I 'cat time.h | more' I am able to read it fine.

If I compile as root I get this:

IIsi# gcc scanlogd.c
In file included from scanlogd.c:13:
/usr/include/sys/time.h:168: time.h: Device not configured

This could conceivebley be a damaged file system. I reacently had to
fsck -y on it and load in the sbc kernel.  There was a whole bunch of
scrolling/removing going on. I think it removed the man 5 subdirectory
`cause man gcc doesn't return anything.

Maybe i need to reinstall comp.tgz & man.tgz or everything.

Any hints are appreciated.

Thanks,

Gerald