File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 2525#include <pthread.h>
2626#include <sys/wait.h>
2727#include <stdlib.h>
28+ #include <stdint.h>
2829
2930#define ISspace (x ) isspace((int)(x))
3031
@@ -53,7 +54,7 @@ void unimplemented(int);
5354/**********************************************************************/
5455void accept_request (void * arg )
5556{
56- int client = * ( int * )arg ;
57+ int client = ( intptr_t )arg ;
5758 char buf [1024 ];
5859 size_t numchars ;
5960 char method [255 ];
@@ -500,7 +501,7 @@ int main(void)
500501 if (client_sock == -1 )
501502 error_die ("accept" );
502503 /* accept_request(client_sock); */
503- if (pthread_create (& newthread , NULL , (void * )accept_request , (void * )& client_sock ) != 0 )
504+ if (pthread_create (& newthread , NULL , (void * )accept_request , (void * )( intptr_t ) client_sock ) != 0 )
504505 perror ("pthread_create" );
505506 }
506507
You can’t perform that action at this time.
0 commit comments