[rtems-libbsd commit] nfsclient: Fix for 64-bit targets
Sebastian Huber
sebh at rtems.org
Fri Mar 29 08:05:36 UTC 2019
Module: rtems-libbsd
Branch: 5-freebsd-12
Commit: 9723b63327960b2b03412caf3e3babe78c464b99
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=9723b63327960b2b03412caf3e3babe78c464b99
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Fri Mar 29 08:55:37 2019 +0100
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.
---
rtemsbsd/nfsclient/nfs.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/rtemsbsd/nfsclient/nfs.c b/rtemsbsd/nfsclient/nfs.c
index 53b0ff1..d6f4330 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;
More information about the vc
mailing list