Subject: [netatalk-admins] Problem building netatalk

From: [email-masked]
Date: Thu, 29 Apr 1999 01:48:39 EDT

I am trying to build netatalk on a linux box (Mandrake Linux 2.0.36, seems to 
look a lot like RedHat). I am getting the error

  make[3]: Entering directory `/home/andrew/dist/netatalk-1.3.3/libatalk/asp'
  gcc -p  -O2 -I../../include -c asp_getsess.c
  asp_getsess.c: In function `asp_getsession':
  asp_getsess.c:178: incompatible types in assignment
  asp_getsess.c:186: incompatible types in assignment

Lines 178 and 186 are

  178:  asv.sa_mask = 0;
  186:  csv.sa_mask = 0;

I see asv and csv are defined as struct sigaction types. I also find a 
sigaction.h under /usr/include that claims to be the correct implementation 
for Linux. However, I do not find that file included in any of the source 
files. Am I warm about the problem? Any suggestions on how to fix it?

Thanks!

Andrew Robinson

---

From: "Paul J. Schinder" <[email-masked]>
Date: Thu, 29 Apr 1999 08:41:45 -0400

On Thu, Apr 29, 1999 at 01:48:39AM -0400, [email-masked] wrote:
} I am trying to build netatalk on a linux box (Mandrake Linux 2.0.36, seems to 
} look a lot like RedHat). I am getting the error
} 
}   make[3]: Entering directory `/home/andrew/dist/netatalk-1.3.3/libatalk/asp'
}   gcc -p  -O2 -I../../include -c asp_getsess.c
}   asp_getsess.c: In function `asp_getsession':
}   asp_getsess.c:178: incompatible types in assignment
}   asp_getsess.c:186: incompatible types in assignment
} 
} Lines 178 and 186 are
} 
}   178:  asv.sa_mask = 0;
}   186:  csv.sa_mask = 0;
} 
} I see asv and csv are defined as struct sigaction types. I also find a 
} sigaction.h under /usr/include that claims to be the correct implementation 
} for Linux. However, I do not find that file included in any of the source 
} files. Am I warm about the problem? Any suggestions on how to fix it?

It may be included via another #include (they tend to be rats nests of
dependencies these days), so I doubt that that's the problem.  (You
should be able to find out quickly by gcc -E).  Notice that it's not
barfing about not knowing what a struct sigaction is, merely that 0
has the wrong type for the assign.  Looks like you need to look in the
include file and see what type asv.sa_mask is supposed to have and do
a cast.  On my LinuxPPC machine with a 2.2.1 kernel, struct sigaction
has a

	__sigset_t sa_mask;

So I'd try

	asv.sa_mask = (__sigset_t) 0;

and see what happens.  (__sigset_t itself is defined in sigset.h on my
machine.)  YMMV, so you'd better look before trying anything.

} 
} Thanks!
} 
} Andrew Robinson

-- 
Paul Schinder
[email-masked]