I am trying to build a Shairport-sync with mqtt on alpine.
however, an error occurs in dacp.c when include --with-mqtt-client option in configure. and if not include --with-mqtt-client option, then build work very well.
include configure options:
--with-alsa / --with-pipe / --with-avahi / --with-ssl=openssl / --with-soxr / --with-mqtt-client
Error code:
gcc -DHAVE_CONFIG_H -I. -Wno-multichar -Wall -Wextra -Wno-clobbered -Wno-psabi -pthread -DSYSCONFDIR=\"/etc\" -g -O2 -MT dacp.o -MD -MP -MF $depbase.Tpo -c -o dacp.o dacp.c &&\
mv -f $depbase.Tpo $depbase.Po
**dacp.c: In function 'dacp_send_command':
dacp.c:213:24: error: storage size of 'tv' isn't known
struct timeval tv;
^~
dacp.c:213:24: warning: unused variable 'tv' [-Wunused-variable]
make[2]: *** [Makefile:803: dacp.o] Error 1
make[2]: Leaving directory '/root/shairport-sync'
make[1]: *** [Makefile:869: all-recursive] Error 1
make[1]: Leaving directory '/root/shairport-sync'
make: *** [Makefile:593: all] Error 2**
Thanks for the post. I’ll take a look.
Fixed – if you switch to the development branch and pull changes, and then if you redo $ autoreconf -fi, you should be able to run the ./configure... step.
BTW, the fix was to add one line – the middle one below – to dacp.c:
#include <stdlib.h>
#include <sys/time.h>
#include <time.h>
Thanks for reporting.
Fixed – if you switch to the
developmentbranch and pull changes, and then if you redo$ autoreconf -fi, you should be able to run the./configure...step.BTW, the fix was to add one line – the middle one below – to
dacp.c:#include <stdlib.h> #include <sys/time.h> #include <time.h>Thanks for reporting.
build work very well.
thanks you.
Most helpful comment
Fixed – if you switch to the
developmentbranch and pull changes, and then if you redo$ autoreconf -fi, you should be able to run the./configure...step.BTW, the fix was to add one line – the middle one below – to
dacp.c:Thanks for reporting.