Use __typeof__() instead of typeof()

typeof() is a gcc builtin and is not always available (such as clang when
-std=c*). Both gcc and clang always expose __typeof__(), so just use that.

Change-Id: I75e2a990acc35f6f39b2c353f6548100ec03c67f
This commit is contained in:
Dan Albert 2014-05-21 20:33:28 -07:00
parent 8e85b4f00e
commit a7821b7121

View file

@ -207,7 +207,7 @@ extern int setdomainname(const char *, size_t);
/* Used to retry syscalls that can return EINTR. */
#define TEMP_FAILURE_RETRY(exp) ({ \
typeof (exp) _rc; \
__typeof__(exp) _rc; \
do { \
_rc = (exp); \
} while (_rc == -1 && errno == EINTR); \