Skip to content

Commit

Permalink
Restrict overmatching MACH ifdef to only trigger on OSX and Mach (#661)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zopolis4 authored Sep 29, 2022
1 parent b9ae02e commit 6a68279
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion indi-eqmod/mach_gettime.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* complete rewrite May 2017, Rumen G.Bogdanovski */
#include <time.h>

#ifdef __MACH__ /* Mac OSX prior Sierra is missing clock_gettime() */
#if defined(__MACH__) && defined(__APPLE__) /* Mac OSX prior Sierra is missing clock_gettime() */
#include <mach/clock.h>
#include <mach/mach.h>
void get_utc_time(struct timespec *ts)
Expand Down
2 changes: 1 addition & 1 deletion indi-eqmod/mach_gettime.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#ifndef mach_time_h
#define mach_time_h

#ifdef __MACH__ /* Mac OSX prior Sierra is missing clock_gettime() */
#if defined(__MACH__) && defined(__APPLE__) /* Mac OSX prior Sierra is missing clock_gettime() */
#include <mach/clock.h>
#include <mach/mach.h>
void get_utc_time(struct timespec *ts);
Expand Down

0 comments on commit 6a68279

Please sign in to comment.