Should have used #ifdef, not #if. (Really wish I could cross-compile for
the Mac!)
---
lib/portability.c | 2 +-
lib/portability.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
From cf08ff7212e1a486ca9c48040c87c11477593015 Mon Sep 17 00:00:00 2001
From: Elliott Hughes <[email protected]>
Date: Fri, 24 Sep 2021 16:43:26 -0700
Subject: [PATCH] Fix non-Mac build.
Should have used #ifdef, not #if. (Really wish I could cross-compile for
the Mac!)
---
lib/portability.c | 2 +-
lib/portability.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/portability.c b/lib/portability.c
index ef9cc008..776b1fb9 100644
--- a/lib/portability.c
+++ b/lib/portability.c
@@ -655,7 +655,7 @@ long long sendfile_len(int in, int out, long long bytes, long long *consumed)
return total;
}
-#if __APPLE__
+#ifdef __APPLE__
// The absolute minimum POSIX timer implementation to build timeout(1).
// Note that although timeout(1) uses POSIX timers to get the monotonic clock,
// that doesn't seem to be an option on macOS (without using other libraries),
diff --git a/lib/portability.h b/lib/portability.h
index 9fc0c9b8..63d8251c 100644
--- a/lib/portability.h
+++ b/lib/portability.h
@@ -372,7 +372,7 @@ char *fs_type_name(struct statfs *statfs);
int get_block_device_size(int fd, unsigned long long *size);
-#if __APPLE__
+#ifdef __APPLE__
// Apple doesn't have POSIX timers; this is "just enough" for timeout(1).
typedef int timer_t;
struct itimerspec {
--
2.33.0.685.g46640cef36-goog
_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net