I suspect what you'll need is a collection of #if/#endif guards around the definitions of those macros:
diff --git a/runtime/linux/compat_unistd.h b/runtime/linux/compat_unistd.h index 5a26b77bbccb..45e8b4d6c3d9 100644 --- a/runtime/linux/compat_unistd.h +++ b/runtime/linux/compat_unistd.h @@ -1873,7 +1873,11 @@ #define __NR_compat_chown32 __NR_chown32 #define __NR_compat_chroot __NR_chroot #define __NR_compat_clock_adjtime __NR_clock_adjtime + +#ifndef __NR_compat_clock_getres #define __NR_compat_clock_getres __NR_clock_getres +#endif + #define __NR_compat_clock_gettime __NR_clock_gettime #define __NR_compat_clock_nanosleep __NR_clock_nanosleep #define __NR_compat_clock_settime __NR_clock_settime
etc. for the others you have encountered. Once you have a good set working. please send upstream to <email address hidden>.
I suspect what you'll need is a collection of #if/#endif guards around the definitions of those macros:
diff --git a/runtime/ linux/compat_ unistd. h b/runtime/ linux/compat_ unistd. h .45e8b4d6c3d9 100644 linux/compat_ unistd. h linux/compat_ unistd. h clock_adjtime __NR_clock_adjtime clock_getres clock_getres __NR_clock_getres clock_gettime __NR_clock_gettime clock_nanosleep __NR_clock_ nanosleep clock_settime __NR_clock_settime
index 5a26b77bbccb.
--- a/runtime/
+++ b/runtime/
@@ -1873,7 +1873,11 @@
#define __NR_compat_chown32 __NR_chown32
#define __NR_compat_chroot __NR_chroot
#define __NR_compat_
+
+#ifndef __NR_compat_
#define __NR_compat_
+#endif
+
#define __NR_compat_
#define __NR_compat_
#define __NR_compat_
etc. for the others you have encountered. Once you have a good set working. please send upstream to <email address hidden>.