aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
authorJim Blandy1993-05-22 00:12:17 +0000
committerJim Blandy1993-05-22 00:12:17 +0000
commit39a21be6fcd80359ff5c89a5f391b03af6545ecb (patch)
tree1a7e65bc9b3d489cf89c5881bd9011aa38a593a2 /src/process.c
parent8243aa4e84788144343d086579456e44246fc8f0 (diff)
downloademacs-39a21be6fcd80359ff5c89a5f391b03af6545ecb.tar.gz
emacs-39a21be6fcd80359ff5c89a5f391b03af6545ecb.zip
* process.c (Fopen_network_stream): Deal with older systems, which
only have the h_addr field in their struct hostent.
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/process.c b/src/process.c
index 2b2fc8304dc..9a1012094dd 100644
--- a/src/process.c
+++ b/src/process.c
@@ -1448,8 +1448,13 @@ Fourth arg SERVICE is name of the service desired, or an integer\n\
1448 host_info.h_name = 0; 1448 host_info.h_name = 0;
1449 host_info.h_aliases = 0; 1449 host_info.h_aliases = 0;
1450 host_info.h_addrtype = AF_INET; 1450 host_info.h_addrtype = AF_INET;
1451 host_info.h_addr_list = &(addr_list[0]); 1451#ifdef h_addr
1452 addr_list[0] = (char*)(&numeric_addr); 1452 /* Older machines have only one address slot called h_addr.
1453 Newer machines have h_addr_list, but #define h_addr to
1454 be its first element. */
1455 host_info.h_addr_list = &(addr_list[0]);
1456#endif
1457 host_info.h_addr = (char*)(&numeric_addr);
1453 addr_list[1] = 0; 1458 addr_list[1] = 0;
1454 host_info.h_length = strlen (addr_list[0]); 1459 host_info.h_length = strlen (addr_list[0]);
1455 } 1460 }