Fixed error in compilation
This commit is contained in:
		
							parent
							
								
									c302bed499
								
							
						
					
					
						commit
						44fb3aa66e
					
				@ -43,6 +43,7 @@
 | 
			
		||||
#include <netinet/in.h>     //   
 | 
			
		||||
#include <sys/socket.h>     // 
 | 
			
		||||
#include <arpa/inet.h>      //   
 | 
			
		||||
#include <unistd.h>
 | 
			
		||||
#endif
 | 
			
		||||
/* ------------------------------------------------------------------------ */
 | 
			
		||||
 | 
			
		||||
@ -93,7 +94,7 @@ int main(void)
 | 
			
		||||
	unsigned int         client_s;             // Client socket descriptor
 | 
			
		||||
	struct sockaddr_in   client_addr;          // Client Internet address
 | 
			
		||||
	struct in_addr       client_ip_addr;       // Client IP address
 | 
			
		||||
	int                  addr_len;             // Internet address length
 | 
			
		||||
	socklen_t            addr_len;             // Internet address length
 | 
			
		||||
 | 
			
		||||
    /* FOR UNIX/LINUX ------------------------------------------------------ */
 | 
			
		||||
#ifdef UNIX
 | 
			
		||||
@ -135,7 +136,7 @@ int main(void)
 | 
			
		||||
		nChild_proc_id = fork();
 | 
			
		||||
 | 
			
		||||
		// Separate the parent and child process here ...
 | 
			
		||||
		if (nChild_proc_id == -1) // if I am a new child, go to the child module.
 | 
			
		||||
		if (nChild_proc_id == 0) // if I am a new child, go to the child module.
 | 
			
		||||
		{
 | 
			
		||||
			child_proc(server_s, client_s);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user