From 8250503f218be1a3fa434e905631b1636cf6d033 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 23 Apr 2012 14:42:58 +0200 Subject: librpc: PR2066: Fix for short enums The XDR library has a problem on architectures with short enums like the default ARM EABI. Short enums means that the size of the enum type is variable and the smallest integer type to hold all enum values will be selected. For many enums this is char. The XDR library uses int32_t for enum_t. There are several evil casts from an enum type to enum_t which leads to invalid memory accesses on short enum architectures. A workaround is to add appropriate dummy enum values. --- cpukit/librpc/include/rpc/clnt_stat.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cpukit/librpc/include/rpc/clnt_stat.h') diff --git a/cpukit/librpc/include/rpc/clnt_stat.h b/cpukit/librpc/include/rpc/clnt_stat.h index 397bdbc596..2c68745407 100644 --- a/cpukit/librpc/include/rpc/clnt_stat.h +++ b/cpukit/librpc/include/rpc/clnt_stat.h @@ -73,7 +73,8 @@ enum clnt_stat { RPC_STALERACHANDLE = 25, RPC_CANTCONNECT = 26, /* couldn't make connection (cots) */ RPC_XPRTFAILED = 27, /* received discon from remote (cots) */ - RPC_CANTCREATESTREAM = 28 /* can't push rpc module (cots) */ + RPC_CANTCREATESTREAM = 28, /* can't push rpc module (cots) */ + _CLNT_STAT = 0xffffffff }; #ifdef __cplusplus -- cgit v1.2.3