anyone else have a <sys/stat.h> that DOESN'T #include <sys/types.h> ?
Lucas Standaert
lucas at cray.com
Thu Feb 5 11:21:27 EST 2004
I'm porting openssh 3.7.1p2 to a very BSD 4.4-ish system. My first
hint of a problem was that configure said it couldn't find <sys/types.h>
and that the sizes of char, int, etc were 0 (zero). It turned
out that "confdefs.h" had HAVE_SYS_STAT_H defined, but not HAVE_SYS_TYPES_H,
resulting in code such as the following to fail to compile on
a system where sys/stat.h does NOT include sys/types.h:
ac_includes_default="\
#include <stdio.h>
#if HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#if HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
...
I can't figure out where HAVE_SYS_STAT_H gets added to confdefs.h
by configure, so I worked around the problem by adding this
flag to the configure invocation:
--with-cflags="-DHAVE_SYS_TYPES_H=1"
I see that NetBSD added #include <sys/types.h> to sys/stat.h somewhere
between releases 1.3 and 1.4. Anyone else out there using headers
old enough to hit this problem?
Thanks,
Lucas
More information about the openssh-unix-dev
mailing list