Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions mdstcpip/udt4/src/channel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ void CChannel::open(UDPSOCKET udpsock) {
}

void CChannel::setUDPSockOpt() {
#if defined(BSD) || defined(OSX)
#if defined(BSD) || defined(__APPLE__)
// BSD system will fail setsockopt if the requested buffer size exceeds system
// maximum value
int maxsize = 64000;
Expand All @@ -148,7 +148,7 @@ void CChannel::setUDPSockOpt() {

timeval tv;
tv.tv_sec = 0;
#if defined(BSD) || defined(OSX)
#if defined(BSD) || defined(__APPLE__)
// Known BSD bug as the day I wrote this code.
// A small time out value will cause the socket to block forever.
tv.tv_usec = 10000;
Expand Down
6 changes: 3 additions & 3 deletions mdstcpip/udt4/src/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ written by
#include <cstring>
#include <cerrno>
#include <unistd.h>
#ifdef OSX
#ifdef __APPLE__
#include <mach/mach_time.h>
#endif
#else
Expand Down Expand Up @@ -115,7 +115,7 @@ void CTimer::rdtsc(uint64_t &x) {
// SetThreadAffinityMask(hCurThread, dwOldMask);
if (!ret)
x = getTime() * s_ullCPUFrequency;
#elif defined(OSX)
#elif defined(__APPLE__)
x = mach_absolute_time();
#else
// use system call to read time clock for other archs
Expand All @@ -142,7 +142,7 @@ uint64_t CTimer::readCPUFrequency() {
int64_t ccf;
if (QueryPerformanceFrequency((LARGE_INTEGER *)&ccf))
frequency = ccf / 1000000;
#elif defined(OSX)
#elif defined(__APPLE__)
mach_timebase_info_data_t info;
mach_timebase_info(&info);
frequency = info.denom * 1000ULL / info.numer;
Expand Down