forked from Imagelibrary/rtems
nfsclient: 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.
This commit is contained in:
@@ -48,6 +48,7 @@ enum nfsstat {
|
||||
NFSERR_DQUOT = 69,
|
||||
NFSERR_STALE = 70,
|
||||
NFSERR_WFLUSH = 99,
|
||||
_NFSSTAT = 0xffffffff
|
||||
};
|
||||
typedef enum nfsstat nfsstat;
|
||||
|
||||
@@ -61,6 +62,7 @@ enum ftype {
|
||||
NFSOCK = 6,
|
||||
NFBAD = 7,
|
||||
NFFIFO = 8,
|
||||
_FTYPE = 0xffffffff
|
||||
};
|
||||
typedef enum ftype ftype;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user