Personal tools
You are here: Home members PedroLopes Compiling Olaff's Flashserver on Linux
Document Actions

Compiling Olaff's Flashserver on Linux

by Pedro Lopes last modified 2010-05-08 11:45 PM

This shows how to fix the two small compile-time error when making the Flashserver external from the SVN.

Once you compile flashserver in Linux (at least here happens) you get some errrors:

cc1: warnings being treated as errors
flashserver.c: In function ‘flashserver_doit’:
flashserver.c:674: error: format ‘%d’ expects type ‘int’, but argument 3 has type ‘long int’
flashserver.c: In function ‘flashserver_connectpoll’:
flashserver.c:724: error: pointer targets in passing argument 3 of ‘accept’ differ in signedness
/usr/include/sys/socket.h:214: note: expected ‘socklen_t * __restrict__’ but argument is of type ‘int *’
make: *** [flashserver.pd_linux] Error 1


They are very easy to spot and correct:

  • 1 - flashserver.c:674: error: format ‘%d’ expects type ‘int’, but argument 3 has type ‘long int’: just edit the flashserver.c source file and change the sprintf from:
    sprintf(buf, "%d ", x->x_client[flashserver_get_client(x, x->x_sock_fd)] + 1);
    To the following:
    sprintf(buf, "%ld ", x->x_client[flashserver_get_client(x, x->x_sock_fd)] + 1);x->x_sock_fd)] + 1);
  • 2 -flashserver.c:724: error: pointer targets in passing argument 3 of ‘accept’ differ in signedness: just edit the flashserver.c source file and change the type of sockaddrl from int to socklen_t, as follows
    socklen_t sockaddrl = (int) sizeof( struct sockaddr );

  • Powered by IEM Powered by Plone Section 508 WCAG Valid XHTML Valid CSS Usable in any browser