From 0cb257586abb35cd69be794e7b56244d8704ff57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Tue, 15 Dec 2020 19:44:44 +0100 Subject: [PATCH] Move macro definitions close to usage --- Process.h | 4 ---- linux/LinuxProcess.c | 5 +++++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Process.h b/Process.h index d50865fb..1f118e70 100644 --- a/Process.h +++ b/Process.h @@ -15,10 +15,6 @@ in the source distribution for its full text. #include "Object.h" #include "RichString.h" -#ifdef __ANDROID__ -#define SYS_ioprio_get __NR_ioprio_get -#define SYS_ioprio_set __NR_ioprio_set -#endif #define PROCESS_FLAG_IO 0x0001 #define DEFAULT_HIGHLIGHT_SECS 5 diff --git a/linux/LinuxProcess.c b/linux/LinuxProcess.c index d1cad976..8cd9f492 100644 --- a/linux/LinuxProcess.c +++ b/linux/LinuxProcess.c @@ -184,6 +184,11 @@ static int LinuxProcess_effectiveIOPriority(const LinuxProcess* this) { return this->ioPriority; } +#ifdef __ANDROID__ +#define SYS_ioprio_get __NR_ioprio_get +#define SYS_ioprio_set __NR_ioprio_set +#endif + IOPriority LinuxProcess_updateIOPriority(LinuxProcess* this) { IOPriority ioprio = 0; // Other OSes masquerading as Linux (NetBSD?) don't have this syscall