compile error in httpd.c
Robert P. J. Day
rpjday at mindspring.com
Thu Aug 3 10:46:48 UTC 2006
On Thu, 3 Aug 2006, Max Okumoto wrote:
> Minor problem with declaration. The variable 'on' is defined
> after an assignment statement, so it doesn't compile on older
> version of gcc.
>
> Max
>
> Index: networking/httpd.c
> ===================================================================
> RCS file: /opt/cvs/busybox/networking/httpd.c,v
> retrieving revision 1.1.1.2
> diff -u -r1.1.1.2 httpd.c
> --- networking/httpd.c 9 Jul 2006 19:10:11 -0000 1.1.1.2
> +++ networking/httpd.c 3 Aug 2006 10:35:11 -0000
> @@ -863,6 +863,7 @@
> {
> struct sockaddr_in lsocket;
> int fd;
> + int on = 1;
>
> /* create the socket right now */
> /* inet_addr() returns a value that is already in network order */
> @@ -873,7 +874,6 @@
> fd = bb_xsocket(AF_INET, SOCK_STREAM, 0);
> /* tell the OS it's OK to reuse a previous address even though */
> /* it may still be in a close down state. Allows bind to succeed. */
> - int on = 1;
> #ifdef SO_REUSEPORT
> setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, (void *)&on, sizeof(on)) ;
> #else
applied.
rday
More information about the busybox
mailing list