#if defined LINUX || defined ANDROID
// your code here
#endif /* LINUX || ANDROID */
or-
#if defined(LINUX) || defined(ANDROID)
// your code here
#endif /* LINUX || ANDROID */
Both above are the same, which one you use simply depends on your taste.
P.S.: #ifdef
is simply the short form of #if defined
, however, does not support complex condition.
Further-
#if defined LINUX && defined ANDROID
#if defined LINUX ^ defined ANDROID