I thought a give it a try and start working on a gui less JUCE build on android. I'll report the changes I had to make and hope they will get included in the tip.
As reported by Andrew J in a previous post:
in juce_StandardHeader.h - change the include for <sys/atomics.h> to <stdatomic.h>
in juce_core.cpp - move the include for <sys/timeb.h> inside the "#if ! JUCE_ANDROID" statement
In juce_android_SystemStats.cpp, line 281, sysconf returns a long, therefore this will give a compile time error:
modules/juce_audio_devices/native/juce_android_OpenSL.cpp:168:10: error: 'bool juce::OpenSLAudioIODevice::setAudioPreprocessingEnabled(bool)' marked override, but does not override
Is it correct, that only one of the three issues mentioned here has been fixed? The issue with jmax in juce_android_SystemStats.cpp and the issue in juce_core.cpp still seems to be present in the latest Juce verison.
Otherwise the compiler treated the first argument as a long int and was not able to find a version of jmax that fits.
Changing 1 to 1L did not work for me.
I also had to move "#include <sys/timeb.h>" into the #if ! JUCE_ANDOID statement in juce_core.cpp as stated at the top of this thread, to get it to build.
So unless I have a Juce version mixup, I dont think it has been fixed?
The cast to int seems very odd to me - it doesn't seem to be needed when I build, and if you search the codebase for the string "jmax (1, " then you'll see that there are dozens of places where I've compared an int with 1 without casting, so am puzzled by why only you would have touble with it, and only in this one place! But ok, I'll add the cast if it helps on your system!
sysconf returns a long. Values like "1" are treated by the compiler as an int, and I suppose that on 64 bit systems, since int != long, that is why the cast is needed.