On 04/20/2012 09:09 AM, Peter Lindgren wrote:
Hi,
when cross compiling systemd-44 for my arm target I run into compile
problem in src/util.c
src/util.c: In function 'parse_bytes':
src/util.c:3158:17: error: overflow in implicit constant conversion
[-Werror=overflow]
src/util.c:3159:17: error: overflow in implicit constant conversion
[-Werror=overflow]
src/util.c:3160:17: error: overflow in implicit constant conversion
[-Werror=overflow]
src/util.c: In function 'format_bytes':
src/util.c:6179:17: error: overflow in implicit constant conversion
[-Werror=overflow]
src/util.c:6180:17: error: overflow in implicit constant conversion
[-Werror=overflow]
src/util.c:6181:17: error: overflow in implicit constant conversion
[-Werror=overflow]
This code requires that off_t is defined as an 64bit off_t (off64_t)
using -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64.
Just removing these lines also shows that there is code in
src/conf-parser.c that assert sizeof(off_t) == sizeof(uint64_t).
src/conf-parser.c: In function 'config_parse_bytes_off':
src/conf-parser.c:508:9: error: duplicate case value
Does systemd really require LFS support => off_t to be defined as off64_t?
Or could this code just modified to remove the assert_cc and modify the
parse_bytes function to use an uint64_t instead off off64_t?
Don't do that, use the proper functions and types.
Instead of the compile flag, a define to the source code is also an
option and harder to override ;)
Andreas
--
Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel