From 85edd6c40d598cb0fd70f141e5a1f26c0e514f2d Mon Sep 17 00:00:00 2001 From: GNU Libc Maintainers Date: Sat, 1 Jun 2024 23:16:35 +0200 Subject: [PATCH] git-error_t commit e3ae80adbc626c4073a082e0205fdbb83033018a Author: Samuel Thibault Date: Tue Aug 8 16:03:24 2023 +0200 hurd: Make error_t an int in C++ Making error_t defined to enum __error_t_codes conveniently makes the debugger print symbolic values, but in C++ int is not interoperable with enum __error_t_codes, leading to C++ application build issues, so let's revert error_t to int in C++. Gbp-Pq: Topic hurd-i386 Gbp-Pq: Name git-error_t.diff --- sysdeps/mach/hurd/bits/types/error_t.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sysdeps/mach/hurd/bits/types/error_t.h b/sysdeps/mach/hurd/bits/types/error_t.h index 380aa434d..4a7bd452c 100644 --- a/sysdeps/mach/hurd/bits/types/error_t.h +++ b/sysdeps/mach/hurd/bits/types/error_t.h @@ -24,6 +24,12 @@ #ifndef __error_t_defined # define __error_t_defined 1 +#ifdef __cplusplus +/* Unfortunately, in C++ int and enum __error_t_codes are not + interoperable... */ +typedef int error_t; +#else typedef enum __error_t_codes error_t; +#endif #endif -- 2.30.2