Skip to contentSkip to conversation

curl: fix compilation on OpenBSD

PATCH Applied Paolo Bonzini 4 participants 5 messages Mar 17, 2017 – Mar 20, 2017 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 curl: fix compilation on OpenBSD

EPROTO is not found in OpenBSD. We usually use EIO when no better
errno is available, do that here too.

---
 block/curl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
block/curl.c +1 -1
index e83dcd8..34dbd33 100644
@@ -377,7 +377,7 @@ static void curl_multi_check_completion(BDRVCURLState *s)
                     }
 
                     qemu_mutex_unlock(&s->mutex);
-                    acb->common.cb(acb->common.opaque, -EPROTO);
+                    acb->common.cb(acb->common.opaque, -EIO);
                     qemu_mutex_lock(&s->mutex);
                     qemu_aio_unref(acb);
                     state->acb[i] = NULL;
Signature · 1 line
2.9.3
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Paolo Bonzini

EPROTO is not found in OpenBSD. We usually use EIO when no better
errno is available, do that here too.

Quoted 18 lines
---
 block/curl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
block/curl.c +1 -1
index e83dcd8..34dbd33 100644
@@ -377,7 +377,7 @@ static void curl_multi_check_completion(BDRVCURLState *s)
                     }
 
                     qemu_mutex_unlock(&s->mutex);
-                    acb->common.cb(acb->common.opaque, -EPROTO);
+                    acb->common.cb(acb->common.opaque, -EIO);
                     qemu_mutex_lock(&s->mutex);
                     qemu_aio_unref(acb);
                     state->acb[i] = NULL;
#3 lore raw
Quoted 10 lines · Max Reitz
Quoted 8 lines · Paolo Bonzini

EPROTO is not found in OpenBSD. We usually use EIO when no better
errno is available, do that here too.

---
 block/curl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 3 lines

Thanks, applied to my block branch:

https://github.com/XanClic/qemu/commits/block

Thanks; I've applied it to master as a build fix, though, so you can drop it (or leave it and let the merge sort it out if you like).

thanks
-- PMM

#4 lore raw
Quoted 11 lines · Peter Maydell
Quoted 10 lines · Max Reitz
Quoted 8 lines · Paolo Bonzini

EPROTO is not found in OpenBSD. We usually use EIO when no better
errno is available, do that here too.

---
 block/curl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 7 lines
Quoted 3 lines

Thanks, applied to my block branch:

https://github.com/XanClic/qemu/commits/block

Thanks; I've applied it to master as a build fix, though, so you can drop it (or leave it and let the merge sort it out if you like).

Got it, thanks!

Max