mirror of
				https://github.com/coturn/coturn.git
				synced 2025-10-31 15:00:59 +01:00 
			
		
		
		
	Simplify macOS detection macros (#1372)
This commit is contained in:
		
							parent
							
								
									f8e9892d3e
								
							
						
					
					
						commit
						c062d5e2af
					
				| @ -38,7 +38,7 @@ | |||||||
| 
 | 
 | ||||||
| #include <pthread.h> | #include <pthread.h> | ||||||
| 
 | 
 | ||||||
| #if defined(__unix__) || defined(unix) || defined(__APPLE__) || defined(__DARWIN__) || defined(__MACH__) | #if defined(__unix__) || defined(unix) || defined(__APPLE__) | ||||||
| #include <syslog.h> | #include <syslog.h> | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -36,7 +36,7 @@ | |||||||
| 
 | 
 | ||||||
| #include <sqlite3.h> | #include <sqlite3.h> | ||||||
| 
 | 
 | ||||||
| #if defined(__unix__) || defined(unix) || defined(__APPLE__) || defined(__DARWIN__) || defined(__MACH__) | #if defined(__unix__) || defined(unix) || defined(__APPLE__) | ||||||
| #include <pwd.h> | #include <pwd.h> | ||||||
| #include <sys/types.h> | #include <sys/types.h> | ||||||
| #include <unistd.h> | #include <unistd.h> | ||||||
| @ -149,7 +149,7 @@ static void fix_user_directory(char *dir0) { | |||||||
|   char *dir = dir0; |   char *dir = dir0; | ||||||
|   while (*dir == ' ') |   while (*dir == ' ') | ||||||
|     ++dir; |     ++dir; | ||||||
| #if defined(__unix__) || defined(unix) || defined(__APPLE__) || defined(__DARWIN__) || defined(__MACH__) | #if defined(__unix__) || defined(unix) || defined(__APPLE__) | ||||||
|   if (*dir == '~') { |   if (*dir == '~') { | ||||||
|     char *home = getenv("HOME"); |     char *home = getenv("HOME"); | ||||||
|     if (!home) { |     if (!home) { | ||||||
|  | |||||||
| @ -49,7 +49,7 @@ | |||||||
| 
 | 
 | ||||||
| #include <getopt.h> | #include <getopt.h> | ||||||
| 
 | 
 | ||||||
| #if defined(__unix__) || defined(unix) || defined(__APPLE__) || defined(__DARWIN__) || defined(__MACH__) | #if defined(__unix__) || defined(unix) || defined(__APPLE__) | ||||||
| #include <ifaddrs.h> | #include <ifaddrs.h> | ||||||
| #include <libgen.h> | #include <libgen.h> | ||||||
| #include <sys/resource.h> | #include <sys/resource.h> | ||||||
|  | |||||||
| @ -42,7 +42,7 @@ | |||||||
| #include <sys/param.h> | #include <sys/param.h> | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| #if defined(__APPLE__) || defined(__DARWIN__) || defined(__MACH__) | #if defined(__APPLE__) | ||||||
| #define __APPLE_USE_RFC_3542 | #define __APPLE_USE_RFC_3542 | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user