[systemd-devel] systemd-196/196 fails to build with x32 Abi support

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Fri Jan 18 14:11:54 PST 2013


On Fri, Jan 18, 2013 at 07:34:29PM +0100, Lennart Poettering wrote:
> On Fri, 18.01.13 18:22, Stephan Raue (mailinglists at openelec.tv) wrote:
> 
> > 
> > Am 18.01.2013 18:14, schrieb Colin Walters:
> > >On Fri, 2013-01-18 at 16:14 +0100, Stephan Raue wrote:
> > >
> > >>src/core/manager.c: In function 'manager_setup_time_change':
> > >>src/core/manager.c:160:14: error: static assertion failed:
> > >>"sizeof(time_t) == sizeof(long)"
> > >>           assert_cc(sizeof(time_t) == sizeof(long));
> > >>                ^
> > >You'll have to dive in here and adjust the code - this assumption is not
> > >true on x32.
> > >
> > >
> > this was clear to me, can i get any help with adjusting the code? :-)
> 
> Not sure what the best way is to detect an architecture where time_t is
> "long long" rather than "long". I figure there must be some macro we
> could check for. If we have that, the code can be changed to:
> 
> #ifdef MACRO_TO_CHECK
>         assert_cc(sizeof(time_t) == sizeof(long long));
>         its.it_value.tv_sec = LONG_LONG_MAX;
> #else
>         assert_cc(sizeof(time_t) == sizeof(long));
>         its.it_value.tv_sec = LONG_MAX;
> #endif
> 
> i.e. the goal here is to initialize the time_t value that is tv_sec to
> the maximum possible value.
Fixed that. But then it immediately fails on ../src/core/syscall-list.c :(

Zbyszek


More information about the systemd-devel mailing list