Simplify macOS detection macros (#1372)

pull/1376/head
Pavel Punsky 2 years ago committed by GitHub
parent f8e9892d3e
commit c062d5e2af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/apps/common/ns_turn_utils.c
  2. 4
      src/apps/relay/dbdrivers/dbd_sqlite.c
  3. 2
      src/apps/relay/mainrelay.h
  4. 2
      src/ns_turn_defs.h

@ -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…
Cancel
Save