mirror of
				https://github.com/lunarmodules/luasocket.git
				synced 2025-10-27 08:33:04 +01:00 
			
		
		
		
	Changed to be able to compile with -ansi and -pedantic!
Have to try in MacOS X again...
This commit is contained in:
		| @@ -20,6 +20,9 @@ | ||||
| #include <sys/time.h> | ||||
| #include <sys/times.h> | ||||
| #include <unistd.h> | ||||
| #ifndef CLK_TCK | ||||
| #define CLK_TCK (sysconf(_SC_CLK_TCK)); | ||||
| #endif | ||||
| #endif | ||||
|  | ||||
| /*=========================================================================*\ | ||||
|   | ||||
| @@ -16,6 +16,7 @@ | ||||
| * RCS ID: $Id$ | ||||
| \*=========================================================================*/ | ||||
| #include <string.h> | ||||
| #include <signal.h> | ||||
|  | ||||
| #include "socket.h" | ||||
|  | ||||
| @@ -24,11 +25,14 @@ | ||||
| \*-------------------------------------------------------------------------*/ | ||||
| int sock_open(void) | ||||
| { | ||||
|     /* instals a handler to ignore sigpipe or it will crash us */ | ||||
| #if DOESNT_COMPILE_TRY_THIS | ||||
|     struct sigaction ignore; | ||||
|     memset(&ignore, 0, sizeof(ignore)); | ||||
|     ignore.sa_handler = SIG_IGN; | ||||
|     sigaction(SIGPIPE, &ignore, NULL); | ||||
| #endif | ||||
|     /* instals a handler to ignore sigpipe or it will crash us */ | ||||
|     signal(SIGPIPE, SIG_IGN); | ||||
|     return 1; | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user