Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mkfs.fat: fix incorrect int type #9

Closed
wants to merge 1 commit into from
Closed

mkfs.fat: fix incorrect int type #9

wants to merge 1 commit into from

Conversation

yann-morin-1998
Copy link
Contributor

u_int32_t is not a stanard type, while uint32_t is. This fixes builds
with the musl C library, which only defines so-called "clean" headers;
build failures are like (back-quotes and elision manually added for
readability):

http://autobuild.buildroot.org/results/a09/a0923d7f6d4dbae02eba4c5024bbdae3a52aa85a/build-end.log

/home/peko/autobuild/instance-1/output/host/usr/bin/x86_64-linux-gcc -D_LARGEFILE_SOURCE \
    -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64   -Os  -D_GNU_SOURCE -D_LARGEFILE_SOURCE \
    -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -c -o mkfs.fat.o src/mkfs.fat.c
src/mkfs.fat.c: In function 'main':
src/mkfs.fat.c:1415:18: error: 'u_int32_t' undeclared (first use in this function)
     volume_id = (u_int32_t) ((create_timeval.tv_sec << 20) | create_timeval.tv_usec); [...]
                  ^
src/mkfs.fat.c:1415:18: note: each undeclared identifier is reported only once for each
function it appears in

Signed-off-by: "Yann E. MORIN" yann.morin.1998@free.fr

u_int32_t is not a stanard type, while uint32_t is. This fixes builds
with the musl C library, which only defines so-called "clean" headers;
build failures are like (back-quotes and elision manually added for
readability):

    http://autobuild.buildroot.org/results/a09/a0923d7f6d4dbae02eba4c5024bbdae3a52aa85a/build-end.log

    /home/peko/autobuild/instance-1/output/host/usr/bin/x86_64-linux-gcc -D_LARGEFILE_SOURCE \
        -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64   -Os  -D_GNU_SOURCE -D_LARGEFILE_SOURCE \
        -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -c -o mkfs.fat.o src/mkfs.fat.c
    src/mkfs.fat.c: In function 'main':
    src/mkfs.fat.c:1415:18: error: 'u_int32_t' undeclared (first use in this function)
         volume_id = (u_int32_t) ((create_timeval.tv_sec << 20) | create_timeval.tv_usec); [...]
                      ^
    src/mkfs.fat.c:1415:18: note: each undeclared identifier is reported only once for each
    function it appears in

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
@andreasbombe
Copy link
Contributor

Applied, thank you very much.

@yann-morin-1998
Copy link
Contributor Author

Thanks for the quick response! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants