httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@ast.cam.ac.uk (David Robinson)
Subject Re: votes on patches
Date Wed, 22 Nov 1995 11:34:00 GMT
 0      44_ident.0.8.16.patch

        Wups.  Can someone improve this?

        compiler warning:

        gcc -c -O2 -DXBITHACK -m486 http_main.c
        http_main.c: In function `child_main':
        http_main.c:786: warning: passing arg 2 of `getsockname' from incompatible pointer
type

        Note: from 'man getsockname' on FreeBSD we get:

        SYNOPSIS
             int
             getsockname(int s, struct sockaddr *name, int *namelen)

        I mean, it seems to work (had to install inetd to test it even),
        but I think we just got lucky.

The warning is harmless, but this patch (to be applied after 44_ident)
should fix it.

 David.

*** http_main.c.orig2	Mon Nov  6 18:20:18 1995
--- http_main.c	Wed Nov 22 11:15:13 1995
***************
*** 718,729 ****
  void child_main(int child_num_arg)
  {
      int clen;
- #if defined(NEXT) || defined(LINUX) || defined(SOLARIS2)
      struct sockaddr sa_server;
      struct sockaddr sa_client;
- #else
-     struct sockaddr_in sa_server,sa_client;
- #endif
  
  #ifdef ULTRIX_BRAIN_DEATH
      extern char *rfc931();
--- 718,725 ----
***************
*** 776,782 ****
  	
  	accept_mutex_on();  /* Lock around "accept", if necessary */
  	
! 	while ((csd=accept(sd,(struct sockaddr *)&sa_client,&clen)) == -1) 
             if (errno != EINTR) 
  		log_error("socket error: accept failed", server_conf);
  
--- 772,778 ----
  	
  	accept_mutex_on();  /* Lock around "accept", if necessary */
  	
! 	while ((csd=accept(sd, &sa_client, &clen)) == -1) 
             if (errno != EINTR) 
  		log_error("socket error: accept failed", server_conf);
  

Mime
View raw message