Menu

Build on alpine

abille
2017-01-12
2017-01-12
  • abille

    abille - 2017-01-12

    Hi,
    i was trying to build uftp 4.9.2 under alpine linux and getting the following error,
    no problem with 3.7.3

    gcc -g -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -Wformat=2 -Wwrite-strings -Wpointer-arith -Wcast-qual -Wshadow -Wno-missing-field-initializers -Wstrict-prototypes -Winline -Wbad-function-cast -DHAS_GETIFADDRS getconf LFS_CFLAGS -c server_common.c
    getconf: LFS_CFLAGS: unknown variable
    In file included from server.h:34:0,
    from server_common.c:49:
    uftp_common.h:173:44: warning: 'struct timeval' declared inside parameter list
    int32_t diff_sec(struct timeval t2, struct timeval t1);
    ^
    uftp_common.h:173:44: warning: its scope is only this definition or declaration, which is probably not what you want
    uftp_common.h:174:45: warning: 'struct timeval' declared inside parameter list
    int64_t diff_usec(struct timeval t2, struct timeval t1);
    ^
    uftp_common.h:175:44: warning: 'struct timeval' declared inside parameter list
    int cmptimestamp(struct timeval t1, struct timeval t2);
    ^
    In file included from server_common.c:49:0:
    server.h:61:20: error: field 'time' has incomplete type
    struct timeval time; /// Time that this client finished
    ^
    makefile:197: recipe for target 'server_common.o' failed
    make: *** [server_common.o] Error 1

    i resolved it by adding #include "sys/time.h"
    to client, server,proxy and uftp_common.h

    best regards

     

    Last edit: abille 2017-01-12
  • Dennis Bush

    Dennis Bush - 2017-01-12

    Thanks for the bug report. I'll include this in the next release.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.