[sane-devel] backends 1.0.12 compile-error

Gerfried Maier moali@sbox.tugraz.at
Tue, 03 Jun 2003 11:27:28 +0200

Martijn van Oosterhout wrote:

>On Tue, Jun 03, 2003 at 09:42:19AM +0200, Gerfried Maier wrote:
>>saned.c: In function `check_host':
>>saned.c:559: structure has no member named `ss_family'
>>saned.c:562: warning: unreachable code at beginning of switch statement

The affected lines from saned.c - unfortunately I'm not very used to 
C-programming, so that I cannot read that much out of them:

  switch (remote_address.ss_family)
      case AF_INET:
        if (IN_LOOPBACK (ntohl (sin->sin_addr.s_addr)))
            DBG (DBG_MSG,
                 "check_host: remote host is IN_LOOPBACK: access 
            return SANE_STATUS_GOOD;

remote_address is defined somewhere around line 195 in saned.c:
static struct sockaddr_storage remote_address;
static int remote_address_len;
static struct in_addr remote_address;
#endif /* SANED_USES_AF_INDEP */

>I can't quite see what the problem is, my version here doesn't show it. Can
>you check the strucutre used to see if it really has it.
>Oh yeah, what OS is this?
Sorry, 've forgotten to mention it: Linux with Kernel 2.4.17

Maier Gerfried