comparison src/process.c @ 2944:f66a150d3fb9

* process.c (Fopen_network_stream): Deal with older systems, which only have the h_addr field in their struct hostent.
author Jim Blandy <jimb@redhat.com>
date Sat, 22 May 1993 00:12:17 +0000
parents 725698689fbd
children e94a593c3952
comparison
equal deleted inserted replaced
2943:be86b41a0661 2944:f66a150d3fb9
1446 1446
1447 host_info_ptr = &host_info; 1447 host_info_ptr = &host_info;
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 }
1456 1461
1457 bzero (&address, sizeof address); 1462 bzero (&address, sizeof address);