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