libmedia: Preserve futex return status in client obtainBuffer

clock_gettime() can change errno if something goes wrong (most
commonly setting EBADF). This failure should not cause a failure
in ClientProxy::obtainBuffer() if the futex returned successfully
or with a known status. Preserve errno before calling clock_gettime
to prevent propagation of an invalid, unexpected error.

authored-by: Leena Winterrowd <lenhardw@codeaurora.org>

Change-Id: Ib69201031a81395ece47dd8ad7c4dcddd2b00153
1 file changed