Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 23 Jan 2013 12:37:54 -0500
From: Rich Felker <dalias@...ifal.cx>
To: musl@...ts.openwall.com
Subject: Re: unknown type name 'loff_t'

On Wed, Jan 23, 2013 at 06:33:42PM +0100, Alexander Stadler wrote:
> Thanks for your fast responses.
> 
> The other error I'm currently running into is
> 
> make[4]: Entering directory `/space/build-trunk/trunk/build_dir/target-mips_r2_musl-0.9.8/uboot-envtools-2012.04.01'
> mips-openwrt-linux-musl-gcc -Wall -Os -pipe -mips32r2 -mtune=mips32r2 -fno-caller-saves -mno-branch-likely -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float  -I/space/build-trunk/trunk/staging_dir/target-mips_r2_musl-0.9.8/usr/include -I/space/build-trunk/trunk/staging_dir/target-mips_r2_musl-0.9.8/include -I/space/build-trunk/trunk/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_musl-0.9.8/usr/include -I/space/build-trunk/trunk/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_musl-0.9.8/include  crc32.c fw_env.c fw_env_main.c -o fw_printenv
> fw_env.c:643:55: error: unknown type name 'loff_t'
> fw_env.c: In function 'flash_read_buf':
> fw_env.c:680:2: error: unknown type name 'loff_t'
> fw_env.c:713:3: warning: implicit declaration of function 'flash_bad_block' [-Wimplicit-function-declaration]
> fw_env.c: In function 'flash_write_buf':
> fw_env.c:777:2: error: unknown type name 'loff_t'
> make[4]: *** [fw_printenv] Error 1
> make[4]: Leaving directory `/space/build-trunk/trunk/build_dir/target-mips_r2_musl-0.9.8/uboot-envtools-2012.04.01'

Where is loff_t being used? It's probably the wrong type to use. The
only APIs loff_t is to be used with are under _GNU_SOURCE, so if you
don't need -D_GNU_SOURCE to get the functions, it's doubtful that
loff_t should be used. These functions are in fcntl.h, and it will
#define loff_t off_t when _GNU_SOURCE is defined, so either
-D_GNU_SOURCE or -Dloff_t=off_t would be a workaround, but I think the
issue should be investigated to determine if there's code that needs
to be fixed or if there are other circumstances under which loff_t
should be exposed by musl.

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.