*: Remove APPLE #defines from build

We cannot build on apple machines at all due
to our usage of some gcc extensions that will
probably never see the light of day again.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
Donald Sharp 2023-11-04 08:30:31 +00:00
parent 315aa6cde4
commit 42ddcf71e5
7 changed files with 11 additions and 32 deletions

View File

@ -1180,9 +1180,6 @@ m4_define([FRR_INCLUDES],
/* Required for MAXSIG */
#include <signal.h>
#include <sys/socket.h>
#ifdef __APPLE__
# define __APPLE_USE_RFC_3542
#endif
#include <netinet/in.h>
#include <sys/time.h>
#include <time.h>

View File

@ -55,11 +55,6 @@ static int event_timer_cmp(const struct event *a, const struct event *b)
DECLARE_HEAP(event_timer_list, struct event, timeritem, event_timer_cmp);
#if defined(__APPLE__)
#include <mach/mach.h>
#include <mach/mach_time.h>
#endif
#define AWAKEN(m) \
do { \
const unsigned char wakebyte = 0x01; \

View File

@ -158,7 +158,7 @@ inet4:
return dst;
}
#if !defined(INET_NTOP_NO_OVERRIDE) && !defined(__APPLE__)
#if !defined(INET_NTOP_NO_OVERRIDE)
/* we want to override libc inet_ntop, but make sure it shows up in backtraces
* as frr_inet_ntop (to avoid confusion while debugging)
*/

View File

@ -10,13 +10,12 @@
#include "sockunion.h"
#include "lib_errors.h"
#if (defined(__FreeBSD__) \
&& ((__FreeBSD_version >= 500022 && __FreeBSD_version < 700000) \
|| (__FreeBSD_version < 500000 && __FreeBSD_version >= 440000))) \
|| (defined(__NetBSD__) && defined(__NetBSD_Version__) \
&& __NetBSD_Version__ >= 106010000) \
|| defined(__OpenBSD__) || defined(__APPLE__) \
|| defined(__DragonFly__) || defined(__sun)
#if (defined(__FreeBSD__) && \
((__FreeBSD_version >= 500022 && __FreeBSD_version < 700000) || \
(__FreeBSD_version < 500000 && __FreeBSD_version >= 440000))) || \
(defined(__NetBSD__) && defined(__NetBSD_Version__) && \
__NetBSD_Version__ >= 106010000) || \
defined(__OpenBSD__) || defined(__DragonFly__) || defined(__sun)
#define HAVE_BSD_STRUCT_IP_MREQ_HACK
#endif

View File

@ -76,10 +76,6 @@
#include <sys/sockio.h>
#endif /* HAVE_SYS_SOCKIO_H */
#ifdef __APPLE__
#define __APPLE_USE_RFC_3542
#endif
#ifndef HAVE_LIBCRYPT
#ifdef HAVE_LIBCRYPTO
#include <openssl/des.h>
@ -280,10 +276,9 @@ struct in_pktinfo {
* OpenBSD: network byte order, apart from older versions which are as per
* *BSD
*/
#if defined(__NetBSD__) \
|| (defined(__FreeBSD__) && (__FreeBSD_version < 1100030)) \
|| (defined(__OpenBSD__) && (OpenBSD < 200311)) \
|| (defined(__APPLE__))
#if defined(__NetBSD__) || \
(defined(__FreeBSD__) && (__FreeBSD_version < 1100030)) || \
(defined(__OpenBSD__) && (OpenBSD < 200311))
#define HAVE_IP_HDRINCL_BSD_ORDER
#endif

View File

@ -32,9 +32,6 @@
#ifdef __DragonFly__
#include <sys/lwp.h>
#endif
#ifdef __APPLE__
#include <mach/mach_traps.h>
#endif
#ifdef HAVE_LIBUNWIND
#define UNW_LOCAL_ONLY

View File

@ -48,11 +48,7 @@ extern struct zebra_privs_t zserv_privs;
* 0). We follow this practice without questioning it, but it is a
* bug if frr calls ROUNDUP with 0.
*/
#ifdef __APPLE__
#define ROUNDUP_TYPE int
#else
#define ROUNDUP_TYPE long
#endif
#define ROUNDUP_TYPE long
/*
* Because of these varying conventions, the only sane approach is for