Fixed error in compilation

This commit is contained in:
TriantaTV 2023-09-26 14:37:47 -05:00
parent c302bed499
commit 44fb3aa66e

View File

@ -43,6 +43,7 @@
#include <netinet/in.h> // #include <netinet/in.h> //
#include <sys/socket.h> // #include <sys/socket.h> //
#include <arpa/inet.h> // #include <arpa/inet.h> //
#include <unistd.h>
#endif #endif
/* ------------------------------------------------------------------------ */ /* ------------------------------------------------------------------------ */
@ -93,7 +94,7 @@ int main(void)
unsigned int client_s; // Client socket descriptor unsigned int client_s; // Client socket descriptor
struct sockaddr_in client_addr; // Client Internet address struct sockaddr_in client_addr; // Client Internet address
struct in_addr client_ip_addr; // Client IP 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 ------------------------------------------------------ */ /* FOR UNIX/LINUX ------------------------------------------------------ */
#ifdef UNIX #ifdef UNIX
@ -135,7 +136,7 @@ int main(void)
nChild_proc_id = fork(); nChild_proc_id = fork();
// Separate the parent and child process here ... // 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); child_proc(server_s, client_s);
} }