<div dir="ltr">Hi I was trying to cross compile rpcapd and use on my asus rt-n16 router ( tomato shibby v132 firmware). I followed the tutorial on their official website.<br><br><a href="https://www.winpcap.org/docs/docs_40_2/html/group__remote.html#UNIX">https://www.winpcap.org/docs/docs_40_2/html/group__remote.html#UNIX</a><br><br>I successfully build my toolchain with crosstools-ng 1.22, ( it works I compiled some programs to run on my router, ) , but When I compile rpcapd , it errors out at this macro definition.<br><br>it's in  winpcap/wpcap/libpcap/pcap-int.h<br><br><br>#ifndef HAVE_STRLCPY<br>#define strlcpy(x, y, z) \<br>    (strncpy((x), (y), (z)), \<br>     ((z) <= 0 ? 0 : ((x)[(z) - 1] = '\0')), \<br>     strlen((y)))<br>#endif<br><br>the same code compiles fine under linux ( centos 7.0)<br><br>the error message is<br><br><br>[oglop@t450s rpcapd]$ make<br>mipsel-unknown-linux-uclibc-gcc -pthread -DHAVE_REMOTE -DHAVE_SNPRINTF -I../ -c daemon.c<br>In file included from daemon.c:34:0:<br>../pcap-int.h:452:12: error: expected declaration specifiers or '...' before '(' token<br>  (wstrncpy((x), (y), (z)), ((z) <= 0 ? 0 : ((x)[(z) - 1] = '\0')),  strlen((y)))<br>            ^<br>../pcap-int.h:452:17: error: expected declaration specifiers or '...' before '(' token<br>  (wstrncpy((x), (y), (z)), ((z) <= 0 ? 0 : ((x)[(z) - 1] = '\0')),  strlen((y)))<br>                 ^<br>../pcap-int.h:452:22: error: expected declaration specifiers or '...' before '(' token<br>  (wstrncpy((x), (y), (z)), ((z) <= 0 ? 0 : ((x)[(z) - 1] = '\0')),  strlen((y)))<br>                      ^<br>../pcap-int.h:452:26: error: expected ')' before ',' token<br>  (wstrncpy((x), (y), (z)), ((z) <= 0 ? 0 : ((x)[(z) - 1] = '\0')),  strlen((y)))<br>                          ^<br>daemon.c: In function 'daemon_AuthUserPwd':<br>daemon.c:684:39: warning: implicit declaration of function 'crypt' [-Wimplicit-function-declaration]<br>  if (strcmp(usersp->sp_pwdp, (char *) crypt(password, usersp->sp_pwdp) ) != 0)<br>                                       ^<br>make: *** [daemon.o] Error 1<br><br><br>my configure for libpcap is<br><br>CC=mipsel-unknown-linux-uclibc-gcc CXX=mipsel-unknown-linux-uclibc-g++ AR=mipsel-unknown-linux-uclibc-ar RANLIB=mipsel-unknown-linux-uclibc-ranlib ac_cv_linux_vers=2 ./configure --prefix=$TARGET_DIR --host=mipsel-uclibc-linux --with-pcap=linux<br><br>and it compiles fine.<br><br>How can I get rid of the macro error ? Thanks!</div>