Fix a TEMP_FAILURE_RETRY usage error in the linker.

Similar to the fix in c20d0f3993ebb0d3dec958a306a68ebb48bfeadd.

grep(1) says this was the only other instance in bionic.

Change-Id: I1729038762ee1c7c4743a6bd11d5558afd6f5749
This commit is contained in:
Elliott Hughes 2012-07-27 15:30:51 -07:00
parent 9061c6e7ae
commit 8dfc073b14

View File

@ -648,16 +648,15 @@ typedef struct {
static unsigned long
is_prelinked(int fd, const char *name)
{
off_t sz;
prelink_info_t info;
sz = lseek(fd, -sizeof(prelink_info_t), SEEK_END);
off_t sz = lseek(fd, -sizeof(prelink_info_t), SEEK_END);
if (sz < 0) {
DL_ERR("lseek() failed!");
return 0;
}
if (TEMP_FAILURE_RETRY(read(fd, &info, sizeof(info)) != sizeof(info))) {
prelink_info_t info;
int rc = TEMP_FAILURE_RETRY(read(fd, &info, sizeof(info)));
if (rc != sizeof(info)) {
WARN("Could not read prelink_info_t structure for `%s`\n", name);
return 0;
}