Fix platform check for `-A` CoreSight mode
MODIFY
src/afl-analyze.c
src/afl-analyze.c
@@ -995,13 +995,11 @@ int main(int argc, char **argv_orig, char **envp) {
case 'A': /* CoreSight mode */
- if (cs_mode) { FATAL("Multiple -A options not supported"); }
-
- if (!(__aarch64__ && __linux__)) {
-
+#if !defined(__aarch64__) || !defined(__linux__)
FATAL("-A option is not supported on this platform");
+#endif
- }
+ if (cs_mode) { FATAL("Multiple -A options not supported"); }
cs_mode = 1;
fsrv.cs_mode = cs_mode;

MODIFY
src/afl-fuzz.c
src/afl-fuzz.c
@@ -829,13 +829,11 @@ int main(int argc, char **argv_orig, char **envp) {
case 'A': /* CoreSight mode */
- if (afl->fsrv.cs_mode) { FATAL("Multiple -A options not supported"); }
-
- if (!(__aarch64__ && __linux__)) {
-
+ #if !defined(__aarch64__) || !defined(__linux__)
FATAL("-A option is not supported on this platform");
+ #endif
- }
+ if (afl->fsrv.cs_mode) { FATAL("Multiple -A options not supported"); }
afl->fsrv.cs_mode = 1;

MODIFY
src/afl-showmap.c
src/afl-showmap.c
@@ -1067,13 +1067,11 @@ int main(int argc, char **argv_orig, char **envp) {
* undocumenetd feature "Another afl-cmin specific feature." */
case 'P': /* CoreSight mode */
- if (fsrv->cs_mode) { FATAL("Multiple -P options not supported"); }
-
- if (!(__aarch64__ && __linux__)) {
-
+#if !defined(__aarch64__) || !defined(__linux__)
FATAL("-P option is not supported on this platform");
+#endif
- }
+ if (fsrv->cs_mode) { FATAL("Multiple -P options not supported"); }
fsrv->cs_mode = true;
break;

MODIFY
src/afl-tmin.c
src/afl-tmin.c
@@ -1038,13 +1038,11 @@ int main(int argc, char **argv_orig, char **envp) {
case 'A': /* CoreSight mode */
- if (fsrv->cs_mode) { FATAL("Multiple -A options not supported"); }
-
- if (!(__aarch64__ && __linux__)) {
-
+#if !defined(__aarch64__) || !defined(__linux__)
FATAL("-A option is not supported on this platform");
+#endif
- }
+ if (fsrv->cs_mode) { FATAL("Multiple -A options not supported"); }
fsrv->cs_mode = 1;
break;

Fix platform check for `-A` CoreSight mode

Signed-off-by: Akira Moroo <retrage01@gmail.com>