As title, I find that procd cant be compiled successfully with glibc(but musl was fined) , the error log was listed below , can anyone help to fix ?
make[6]: Entering directory '/home4/mark/mtk_quark/0826/openwrt/lede/build_dir/target-aarch64_cortex-a53_glibc/procd-2019-08-22-95580316'
[ 2%] Building C object CMakeFiles/procd.dir/sysupgrade.c.o
/home4/openwrt/lede/build_dir/target-aarch64_cortex-a53_glibc/procd-2019-08-22-95580316/sysupgrade.c: In function 'sysupgrade_exec_upgraded':
/home4/openwrt/lede/build_dir/target-aarch64_cortex-a53_glibc/procd-2019-08-22-95580316/sysupgrade.c:57:7: error: implicit declaration of function 'asprintf'; did you mean 'vsprintf'? [-Werror=implicit-function-declaration]
if (asprintf(&name, "%s%s", prefix, blobmsg_name(option)) <= 0)
^~~~~~~~
vsprintf
cc1: all warnings being treated as errors
Hi juppin:
Thanks for your reply ,I have try make clean but it doesn't help , still the same error message .
I found some useful at https://ubuntuforums.org/showthread.php?t=279801 , hence I try to modify sysupgrade.c to add
#define _GNU_SOURCE
in front of #include <stdio.h> and it works , I can compile procd successfully with both glibc and musl. Will anyone help to report/submmit this issue to procd maintainer ?