diff options
author | Orion Hodson <oth@google.com> | 2019-01-29 07:03:26 -0800 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2019-01-29 07:03:26 -0800 |
commit | 2e1916d0e832a858faa499dd1506eb115878dc37 (patch) | |
tree | 4d5e2928ac0e5827193a90a2c2830031fbf82ff1 | |
parent | 3ac5d2a593465f70b12dcc93741ad683b2ab167b (diff) | |
parent | 75325cc476a7071f4f596d3831abc37955e4c62b (diff) | |
download | dalvik-2e1916d0e832a858faa499dd1506eb115878dc37.tar.gz |
Merge "Remove unused libnativehelper include." am: 9c98845827 am: 508151e83c
am: 75325cc476
Change-Id: I22293a763b0c7ba5ccb816d54a66c29c0e05897d
-rw-r--r-- | libdex/SysUtil.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/libdex/SysUtil.cpp b/libdex/SysUtil.cpp index 13d11ff83..3a1cba3b5 100644 --- a/libdex/SysUtil.cpp +++ b/libdex/SysUtil.cpp @@ -30,8 +30,20 @@ #include <limits.h> #include <errno.h> -#include <nativehelper/JNIHelp.h> // TEMP_FAILURE_RETRY may or may not be in unistd - +/* + * TEMP_FAILURE_RETRY is defined by some, but not all, versions of + * <unistd.h>. (Alas, it is not as standard as we'd hoped!) So, if it's + * not already defined, then define it here. + */ +#ifndef TEMP_FAILURE_RETRY +/* Used to retry syscalls that can return EINTR. */ +#define TEMP_FAILURE_RETRY(exp) ({ \ + typeof (exp) _rc; \ + do { \ + _rc = (exp); \ + } while (_rc == -1 && errno == EINTR); \ + _rc; }) +#endif /* * Create an anonymous shared memory segment large enough to hold "length" |