aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2016-12-04 23:18:32 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2016-12-04 23:18:32 +0100
commit71be79a25f1d9efeafa5c634c4499281e8c313f2 (patch)
treea5eba28f12add41ad6edd9e4769567bf46bfad1b
parent90ab295a9e07fe4f6caaa9c19e03b3fba3f3e10d (diff)
downloadglibc-71be79a25f1d9efeafa5c634c4499281e8c313f2.tar
glibc-71be79a25f1d9efeafa5c634c4499281e8c313f2.tar.gz
glibc-71be79a25f1d9efeafa5c634c4499281e8c313f2.tar.bz2
glibc-71be79a25f1d9efeafa5c634c4499281e8c313f2.zip
hurd: fix using hurd.h in C++ programs
* hurd/hurd.h: Cast errno constants to error_t to fix usage in C++ programs.
-rw-r--r--ChangeLog5
-rw-r--r--hurd/hurd.h6
2 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 2da454aeb4..6cbb0a8b98 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-12-04 Samuel Thibault <samuel.thibault@ens-lyon.org>
+
+ * hurd/hurd.h: Cast errno constants to error_t to fix usage in C++
+ programs.
+
2016-12-02 Joseph Myers <joseph@codesourcery.com>
[BZ #20916]
diff --git a/hurd/hurd.h b/hurd/hurd.h
index ec0782797d..022abb59bf 100644
--- a/hurd/hurd.h
+++ b/hurd/hurd.h
@@ -54,15 +54,15 @@ __hurd_fail (error_t err)
case EMACH_SEND_INVALID_DEST:
case EMIG_SERVER_DIED:
/* The server has disappeared! */
- err = EIEIO;
+ err = (error_t) EIEIO;
break;
case KERN_NO_SPACE:
- err = ENOMEM;
+ err = (error_t) ENOMEM;
break;
case KERN_INVALID_ARGUMENT:
- err = EINVAL;
+ err = (error_t) EINVAL;
break;
case 0: