1
0
Fork 0
mirror of https://repo.or.cz/socat.git synced 2025-07-13 23:13:24 +00:00

Fixed build issues on disabled features

This commit is contained in:
Gerhard Rieger 2025-01-29 21:49:16 +01:00
parent af7d44d751
commit 7a90caade5
21 changed files with 182 additions and 95 deletions

View file

@ -226,7 +226,7 @@ int sockname(int fd, FILE *outfile, char style) {
#define FDNAME_OPTLEN 256
#define FDNAME_NAMELEN 256
socklen_t optlen;
#if HAVE_GETPROTOBYNUMBER || HAVE_GETPROTOBYNUMBER_R
#if WITH_IP && ( HAVE_GETPROTOBYNUMBER || HAVE_GETPROTOBYNUMBER_R )
struct protoent protoent, *protoentp;
#endif
#define PROTONAMEMAX 1024
@ -278,7 +278,7 @@ int sockname(int fd, FILE *outfile, char style) {
Getsockopt(fd, SOL_SOCKET, SO_ACCEPTCONN, &optacceptconn, &optlen);
#endif
#if defined(SO_PROTOCOL) || defined(SO_PROTOTYPE)
#if WITH_IP && ( defined(SO_PROTOCOL) || defined(SO_PROTOTYPE) )
#if HAVE_GETPROTOBYNUMBER_R==1 /* Linux */
rc = getprotobynumber_r(proto, &protoent, protoname, sizeof(protoname), &protoentp);
if (protoentp == NULL) {