Compiling Olaff's Flashserver on Linux
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:
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
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
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:
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);
sockaddrl from int to socklen_t, as follows
socklen_t sockaddrl = (int) sizeof( struct sockaddr );