problems building on solaris 2.6
Mark D. Baushke
mdb at juniper.net
Sat Oct 27 07:47:06 EST 2001
Hi Ben,
> Date: Fri, 26 Oct 2001 16:30:34 -0500 (CDT)
> From: <mouring at etoh.eviladmin.org>
>
>
> Does it hurt anything if we just include sys/resource.h if it exists
> always. If we are dealing with 64bit off_t or not?
I am not sure I understand the question. You NEED to include
<sys/resource.h> so that it will be able to deal with the
'#ifdef HAVE_SETRLIMIT' code.
When I added
#define _LARGEFILE64_SOURCE
to the config.h file after the
#define _FILE_OFFSET_BITS 64
I found that ssh built correctly (modulo having to hit it over the
head to NOT use the /usr/local/openssl version that was 0.9.6a and TO
use the /usr/local/openssl-0.0.6b that I tried to configure it to use.
In any case, I'd suggest a configure test that tries to do something
with the following:
% cat rlimtest.c
#define _FILE_OFFSET_BITS 64
#inlcude <sys/resource.h>
struct rlimit rlim = { 0, 0};
% gcc -g -O2 -c rlimtest.c
In file included from mdb.test.c:2:
/usr/include/sys/resource.h:148: warning: `struct rlimit64' declared inside parameter list
/usr/include/sys/resource.h:148: warning: its scope is only this definition or declaration,
/usr/include/sys/resource.h:148: warning: which is probably not what you want.
/usr/include/sys/resource.h:149: warning: `struct rlimit64' declared inside parameter list
rlimtest.c:4: variable `rlim' has initializer but incomplete type
rlimtest.c:4: warning: excess elements in struct initializer after `rlim'
rlimtest.c:4: warning: excess elements in struct initializer after `rlim'
% gcc -g -O2 -D_LARGEFILE64_SOURCE -c rlimtest.c
%
This is probably suitable for a AC_TRY_COMPILE or something...
Thanks,
-- Mark
> - Ben
>
> On Fri, 26 Oct 2001, Mark D. Baushke wrote:
>
> > Using the latest cvs sources, the compilation of ssh.c fails.
> > The 'struct rlimit rlim;' line is being expanded by cpp into
> > 'struct rlimit64 rlim;' and there is no struct rlimit64 defined.
> > In order to get the struct rlimit64 to be included when the
> >
> > #include <sys/resource.h>
> >
> > is used, it appears to need the _LARGEFILE64_SOURCE symbol defined OR
> > it needs the '#if _FILE_OFFSET_BITS == 64' to fail.
> >
> > I suspect this needs to be done with some kind of confgiure magic, but
> > I don't have time to figure out what it is right now...
> >
> > -- Mark
More information about the openssh-unix-dev
mailing list