[Libwebsockets] test-server-v2.0.c

Joel Winarske joel.winarske at gmail.com
Tue Mar 21 22:54:14 CET 2017


Thanks!

My Linux targets include Ubuntu and Yocto.

On Tue, Mar 21, 2017 at 2:43 PM, Andy Green <andy at warmcat.com> wrote:

>
>
> On March 22, 2017 3:09:15 AM GMT+08:00, Joel Winarske <
> joel.winarske at gmail.com> wrote:
> >Is it just me, but when I build on Linux I get the below.  It's
> >resolved
> >with adding #include <string.h>.
>
> It's not 'just you', but, eg, this doesn't happen on Fedora 25 I use, or
> the Travis Linux or Apple builds.
>
> I guess it's because the libc includes on those eventually include
> string.h themselves.  I pushed a patch adding it explicitly.
>
> -Andy
>
> >Joel
> >
> >[ 63%] Building C object
> >CMakeFiles/test-server-v2.0.dir/test-server/test-server-v2.0.c.o
> >/home/joel/libwebsockets/test-server/test-server-v2.0.c: In function
> >‘main’:
> >/home/joel/libwebsockets/test-server/test-server-v2.0.c:278:2: error:
> >implicit declaration of function ‘memset’
> >[-Werror=implicit-function-declaration]
> >  memset(&info, 0, sizeof info);
> >  ^
> >/home/joel/libwebsockets/test-server/test-server-v2.0.c:278:2: error:
> >incompatible implicit declaration of built-in function ‘memset’
> >[-Werror]
> >/home/joel/libwebsockets/test-server/test-server-v2.0.c:278:2: note:
> >include ‘<string.h>’ or provide a declaration of ‘memset’
> >/home/joel/libwebsockets/test-server/test-server-v2.0.c:314:4: error:
> >implicit declaration of function ‘strncpy’
> >[-Werror=implicit-function-declaration]
> >    strncpy(interface_name, optarg, sizeof interface_name);
> >    ^
> >/home/joel/libwebsockets/test-server/test-server-v2.0.c:314:4: error:
> >incompatible implicit declaration of built-in function ‘strncpy’
> >[-Werror]
> >/home/joel/libwebsockets/test-server/test-server-v2.0.c:314:4: note:
> >include ‘<string.h>’ or provide a declaration of ‘strncpy’
> >/home/joel/libwebsockets/test-server/test-server-v2.0.c:396:7: error:
> >implicit declaration of function ‘strlen’
> >[-Werror=implicit-function-declaration]
> >   if (strlen(resource_path) > sizeof(cert_path) - 32) {
> >       ^
> >/home/joel/libwebsockets/test-server/test-server-v2.0.c:396:7: error:
> >incompatible implicit declaration of built-in function ‘strlen’
> >[-Werror]
> >/home/joel/libwebsockets/test-server/test-server-v2.0.c:396:7: note:
> >include ‘<string.h>’ or provide a declaration of ‘strlen’
> >/home/joel/libwebsockets/test-server/test-server-v2.0.c:403:7: error:
> >incompatible implicit declaration of built-in function ‘strlen’
> >[-Werror]
> >   if (strlen(resource_path) > sizeof(key_path) - 32) {
> >       ^
> >/home/joel/libwebsockets/test-server/test-server-v2.0.c:403:7: note:
> >include ‘<string.h>’ or provide a declaration of ‘strlen’
> >cc1: all warnings being treated as errors
> >CMakeFiles/test-server-v2.0.dir/build.make:62: recipe for target
> >'CMakeFiles/test-server-v2.0.dir/test-server/test-server-v2.0.c.o'
> >failed
> >make[2]: ***
> >[CMakeFiles/test-server-v2.0.dir/test-server/test-server-v2.0.c.o]
> >Error 1
> >CMakeFiles/Makefile2:215: recipe for target
> >'CMakeFiles/test-server-v2.0.dir/all' failed
> >make[1]: *** [CMakeFiles/test-server-v2.0.dir/all] Error 2
> >Makefile:149: recipe for target 'all' failed
> >make: *** [all] Error 2
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20170321/b9f9bb2d/attachment-0002.html>


More information about the Libwebsockets mailing list