<div dir="ltr">Thanks!<div><br></div><div>My Linux targets include Ubuntu and Yocto.<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 21, 2017 at 2:43 PM, Andy Green <span dir="ltr"><<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
<br>
On March 22, 2017 3:09:15 AM GMT+08:00, Joel Winarske <<a href="mailto:joel.winarske@gmail.com">joel.winarske@gmail.com</a>> wrote:<br>
>Is it just me, but when I build on Linux I get the below.  It's<br>
>resolved<br>
>with adding #include <string.h>.<br>
<br>
</span>It's not 'just you', but, eg, this doesn't happen on Fedora 25 I use, or the Travis Linux or Apple builds.<br>
<br>
I guess it's because the libc includes on those eventually include string.h themselves.  I pushed a patch adding it explicitly.<br>
<span class="HOEnZb"><font color="#888888"><br>
-Andy<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
>Joel<br>
><br>
>[ 63%] Building C object<br>
>CMakeFiles/test-server-v2.0.<wbr>dir/test-server/test-server-<wbr>v2.0.c.o<br>
>/home/joel/libwebsockets/<wbr>test-server/test-server-v2.0.<wbr>c: In function<br>
>‘main’:<br>
>/home/joel/libwebsockets/<wbr>test-server/test-server-v2.0.<wbr>c:278:2: error:<br>
>implicit declaration of function ‘memset’<br>
>[-Werror=implicit-function-<wbr>declaration]<br>
>  memset(&info, 0, sizeof info);<br>
>  ^<br>
>/home/joel/libwebsockets/<wbr>test-server/test-server-v2.0.<wbr>c:278:2: error:<br>
>incompatible implicit declaration of built-in function ‘memset’<br>
>[-Werror]<br>
>/home/joel/libwebsockets/<wbr>test-server/test-server-v2.0.<wbr>c:278:2: note:<br>
>include ‘<string.h>’ or provide a declaration of ‘memset’<br>
>/home/joel/libwebsockets/<wbr>test-server/test-server-v2.0.<wbr>c:314:4: error:<br>
>implicit declaration of function ‘strncpy’<br>
>[-Werror=implicit-function-<wbr>declaration]<br>
>    strncpy(interface_name, optarg, sizeof interface_name);<br>
>    ^<br>
>/home/joel/libwebsockets/<wbr>test-server/test-server-v2.0.<wbr>c:314:4: error:<br>
>incompatible implicit declaration of built-in function ‘strncpy’<br>
>[-Werror]<br>
>/home/joel/libwebsockets/<wbr>test-server/test-server-v2.0.<wbr>c:314:4: note:<br>
>include ‘<string.h>’ or provide a declaration of ‘strncpy’<br>
>/home/joel/libwebsockets/<wbr>test-server/test-server-v2.0.<wbr>c:396:7: error:<br>
>implicit declaration of function ‘strlen’<br>
>[-Werror=implicit-function-<wbr>declaration]<br>
>   if (strlen(resource_path) > sizeof(cert_path) - 32) {<br>
>       ^<br>
>/home/joel/libwebsockets/<wbr>test-server/test-server-v2.0.<wbr>c:396:7: error:<br>
>incompatible implicit declaration of built-in function ‘strlen’<br>
>[-Werror]<br>
>/home/joel/libwebsockets/<wbr>test-server/test-server-v2.0.<wbr>c:396:7: note:<br>
>include ‘<string.h>’ or provide a declaration of ‘strlen’<br>
>/home/joel/libwebsockets/<wbr>test-server/test-server-v2.0.<wbr>c:403:7: error:<br>
>incompatible implicit declaration of built-in function ‘strlen’<br>
>[-Werror]<br>
>   if (strlen(resource_path) > sizeof(key_path) - 32) {<br>
>       ^<br>
>/home/joel/libwebsockets/<wbr>test-server/test-server-v2.0.<wbr>c:403:7: note:<br>
>include ‘<string.h>’ or provide a declaration of ‘strlen’<br>
>cc1: all warnings being treated as errors<br>
>CMakeFiles/test-server-v2.0.<wbr>dir/build.make:62: recipe for target<br>
>'CMakeFiles/test-server-v2.0.<wbr>dir/test-server/test-server-<wbr>v2.0.c.o'<br>
>failed<br>
>make[2]: ***<br>
>[CMakeFiles/test-server-v2.0.<wbr>dir/test-server/test-server-<wbr>v2.0.c.o]<br>
>Error 1<br>
>CMakeFiles/Makefile2:215: recipe for target<br>
>'CMakeFiles/test-server-v2.0.<wbr>dir/all' failed<br>
>make[1]: *** [CMakeFiles/test-server-v2.0.<wbr>dir/all] Error 2<br>
>Makefile:149: recipe for target 'all' failed<br>
>make: *** [all] Error 2<br>
</div></div></blockquote></div><br></div>