pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkg/42474: Tru64: chat/epic4-2.2 does not compile
The following reply was made to PR pkg/42474; it has been noted by GNATS.
From: RUMI Szabolcs <rumi%rtfm.hu@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc:
Subject: Re: pkg/42474: Tru64: chat/epic4-2.2 does not compile
Date: Sat, 7 Aug 2010 09:23:05 +0200
checking to see if your struct sockaddr includes a length field... yes
Citing from config.log:
configure:4600: checking to see if your struct sockaddr includes a length field
configure:4618: cc -o conftest -O2 -ieee -I/usr/pkg/include -I/usr/pkg/include
-L/usr/pkg/lib -Wl,-rpath,/usr/pkg/lib conftest.c -lcurses -L/usr/ccs/lib
-lssl -lcrypto -lresolv -lm 1>&5
configure:4637: checking whether to support ipv6
Citing from <sys/socket.h>:
#if defined(_SOCKADDR_LEN) || \
defined(_KERNEL) || \
defined(_XOPEN_SOURCE_EXTENDED) || \
defined(_POSIX_PII_SOCKET)
/*
* Structure used by kernel to store most
* addresses.
*/
struct sockaddr {
unsigned char sa_len; /* total length */
sa_family_t sa_family; /* address family */
char sa_data[14]; /* actually longer; address value */
};
[...other structs...]
#else /* BSD4.3 */
struct sockaddr {
unsigned short sa_family; /* address family */
char sa_data[14]; /* up to 14 bytes of direct address */
};
Citing from <sys/un.h>:
#if defined(_SOCKADDR_LEN) || defined(_KERNEL) ||
defined(_XOPEN_SOURCE_EXTENDED)
struct sockaddr_un {
unsigned char sun_len; /* sockaddr len including null
*/
sa_family_t sun_family; /* AF_UNIX, sa_family is introduced by
spec1170 */
char sun_path[104]; /* path name */
};
#else
struct sockaddr_un {
unsigned short sun_family; /* AF_UNIX */
char sun_path[104]; /* path name */
};
#endif
Citing from <netinet/in.h>:
#if defined(_SOCKADDR_LEN) || defined(_KERNEL) || \
defined(_XOPEN_SOURCE_EXTENDED)
struct sockaddr_in {
unsigned char sin_len;
sa_family_t sin_family; /* New typedef for Spec 1170 */
in_port_t sin_port; /* New typedef for Spec 1170 */
struct in_addr sin_addr;
#ifdef _XOPEN_SOURCE_EXTENDED
unsigned char sin_zero[8]; /* Changed type from char to */
/* unsigned char for Spec 1170 */
#else
char sin_zero[8];
#endif
};
#else
struct sockaddr_in {
unsigned short sin_family;
unsigned short sin_port;
struct in_addr sin_addr;
char sin_zero[8];
};
#endif
It seems to me that gailib.h (which is included by gailib.c)
has some workarounds in place for those missing length fields,
so this may be the reason why it doesn't fail while others do.
Issuing 'echo "CFLAGS+=-D_SOCKADDR_LEN" >> /usr/pkg/etc/mk.conf'
does make it compile.
Home |
Main Index |
Thread Index |
Old Index