summaryrefslogtreecommitdiffstats
path: root/rtemsbsd/nfsclient
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2019-03-29 08:55:37 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2019-03-29 09:04:54 +0100
commit66cee309448ef3f5f815a04cd3d5a069b35bd835 (patch)
treeb37b14fb29ce7f8d3d40a4923aefa1a944809a9d /rtemsbsd/nfsclient
parentopenssl02: Fix includes (diff)
downloadrtems-libbsd-66cee309448ef3f5f815a04cd3d5a069b35bd835.tar.bz2
nfsclient: Fix for 64-bit targets
The use of the serporid structure with several embedded unions to split up the specific NFS request/response structures is quite a hack. It breaks on 64-bit targets due to the presence of pointer members which affect the overall alignment.
Diffstat (limited to 'rtemsbsd/nfsclient')
-rw-r--r--rtemsbsd/nfsclient/nfs.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/rtemsbsd/nfsclient/nfs.c b/rtemsbsd/nfsclient/nfs.c
index 53b0ff13..d6f43305 100644
--- a/rtemsbsd/nfsclient/nfs.c
+++ b/rtemsbsd/nfsclient/nfs.c
@@ -401,6 +401,13 @@ DirInfo dip;
#define SERP_ATTR(node) ((node)->serporid.serporid_u.serporid.attributes)
#define SERP_FILE(node) ((node)->serporid.serporid_u.serporid.file)
+/*
+ * FIXME: The use of the serporid structure with several embedded unions to
+ * split up the specific NFS request/response structures is quite a hack. It
+ * breaks on 64-bit targets due to the presence of pointer members which affect
+ * the overall alignment. Use a packed serporidok structure to hopefully fix
+ * this issue.
+ */
typedef struct serporidok {
fattr attributes;
@@ -447,7 +454,7 @@ typedef struct serporidok {
uint32_t count;
} readdirarg;
} arg_u;
-} serporidok;
+} RTEMS_PACKED serporidok;
typedef struct serporid {
nfsstat status;