Move macro definitions close to usage

This commit is contained in:
Christian Göttsche 2020-12-15 19:44:44 +01:00
parent 1193c6e349
commit 0cb257586a
2 changed files with 5 additions and 4 deletions

View File

@ -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

View File

@ -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