summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2012-10-02 09:37:39 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2012-10-02 15:27:35 +0200
commit3becac2ca38bb01d31564a9bd854d5a4b41e456b (patch)
treee0b1490e25221826095dbfe99a63ccf0b1f3922d
parentnfsclient: PR2075: Fix node initialization (diff)
downloadrtems-3becac2ca38bb01d31564a9bd854d5a4b41e456b.tar.bz2
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.
-rw-r--r--cpukit/libfs/src/nfsclient/proto/nfs_prot.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/cpukit/libfs/src/nfsclient/proto/nfs_prot.h b/cpukit/libfs/src/nfsclient/proto/nfs_prot.h
index de812dbfcf..054a77efea 100644
--- a/cpukit/libfs/src/nfsclient/proto/nfs_prot.h
+++ b/cpukit/libfs/src/nfsclient/proto/nfs_prot.h
@@ -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;