Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6bba8117 authored by Elliott Hughes's avatar Elliott Hughes Committed by android-build-merger
Browse files

Merge "Remove a duplicate TEMP_FAILURE_RETRY." am: 166c6a43

am: 0b8a47c5

Change-Id: Id132b10cdf3877ed06bc7cf471ef16f98aba1137
parents a2939f0f 0b8a47c5
Loading
Loading
Loading
Loading
+1 −15
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@

// Include this before open/close/unlink are defined as macros below.
#include <android-base/errors.h>
#include <android-base/macros.h>
#include <android-base/unique_fd.h>
#include <android-base/utf8.h>

@@ -38,21 +39,6 @@
#include "sysdeps/network.h"
#include "sysdeps/stat.h"

/*
 * 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

// Some printf-like functions are implemented in terms of
// android::base::StringAppendV, so they should use the same attribute for
// compile-time format string checking. On Windows, if the mingw version of