Skip to content

Commit fb51176

Browse files
committed
Bugfix: correct #define for Linux.
1 parent 32c8d69 commit fb51176

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

examples/benchmark_read.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ double compute_variance(double* x, size_t n) {
4343
void flush_cache() {
4444
#ifdef __APPLE__
4545
system("bash -c \"sync && sudo purge\"");
46-
#elif __LINUX__
46+
#elif __linux__
4747
system("bash -c \"sync\" && sudo echo 3 > /proc/sys/vm/drop_caches");
4848
#else
4949
static_assert(false);

examples/benchmark_write.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ double compute_variance(double* x, size_t n) {
4343
void flush_cache() {
4444
#ifdef __APPLE__
4545
system("bash -c \"sync && sudo purge\"");
46-
#elif __LINUX__
46+
#elif __linux__
4747
system("bash -c \"sync\" && sudo echo 3 > /proc/sys/vm/drop_caches");
4848
#else
4949
static_assert(false);
@@ -53,7 +53,7 @@ void flush_cache() {
5353
void flush_writes() {
5454
#ifdef __APPLE__
5555
system("bash -c \"sync\"");
56-
#elif __LINUX__
56+
#elif __linux__
5757
system("bash -c \"sync\"");
5858
#else
5959
static_assert(false);

0 commit comments

Comments
 (0)