I am trying to support some of my old code and along the way, I upgraded my system to d5.11.9
At the moment when my code invokes getsockname();
PROCEDURE getsockname (fd: INTEGER): IP.Endpoint =
TYPE
Addr = Uin.struct_sockaddr_in;
VAR
addr: Addr;
endpoint: IP.Endpoint;
len: Usocket.socklen_t := BYTESIZE (addr);
BEGIN
IF Usocket.getsockname (fd, ADR (addr), ADR (len)) >= 0 THEN
I get this:
../src/unix/Common/Usocket.c:253: SockAddrNativeToM3: Assertion family == AF_INET || family == AF_INET6 || family == AF_UNIX' failed.`
Usocket.c code:
static
int
SockAddrNativeToM3(const NativeSockAddrUnionAll* native, M3SockAddrUnionAll* m3)
{
const unsigned family = native->in.sin_family;
#ifdef AF_UNIX
printf("in.sin_family=%d\n", family);
assert(family == AF_INET || family == AF_INET6 || family == AF_UNIX);
family value is zero at this point.
Does this ring a bell to someone? What changed and what do I have to adjust to make this work?
TIA,
dragisha
I am trying to support some of my old code and along the way, I upgraded my system to d5.11.9
At the moment when my code invokes getsockname();
I get this:
../src/unix/Common/Usocket.c:253: SockAddrNativeToM3: Assertionfamily == AF_INET || family == AF_INET6 || family == AF_UNIX' failed.`Usocket.c code:
family value is zero at this point.
Does this ring a bell to someone? What changed and what do I have to adjust to make this work?
TIA,
dragisha