]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
FreeBSD doesn't have ETIME but both FreeBSD and Linux know ETIMEDOUT 509/head
authorTobias Kortkamp <git@tobik.me>
Wed, 12 Apr 2017 13:18:39 +0000 (15:18 +0200)
committerTobias Kortkamp <git@tobik.me>
Sat, 15 Apr 2017 00:28:57 +0000 (02:28 +0200)
common.c

index 0a60a1af4a5b4e9e7efedf91d4b3a452fa9ea78a..48df934acb59ffc0687691d7f8c719148e95d6d7 100644 (file)
--- a/common.c
+++ b/common.c
@@ -648,7 +648,7 @@ ssize_t non_blocking_write(int fd, const void *buf, size_t count) {
     } else if (rc == 0) {
       // warn("non-blocking write timeout waiting for pipe to become ready for writing");
       rc = -1;
-      errno = -ETIME;
+      errno = -ETIMEDOUT;
     } else { // rc > 0, implying it might be ready
       ssize_t bytes_written = write(fd, ibuf, bytes_remaining);
       if (bytes_written == -1) {