of long, to avoid 2038 issue on 32 bit machines.
This makes the amq RPC incompatible with older versions
of amd. It is too much work to provide backwards compatibility
for little benefit, but it can be done.
Fix core-dump in amq -i.
+2022-08-30 Christos Zoulas <christos@zoulas.com>
+
+ * Change times in amq RPCs to be longlong_t instead
+ of long, to avoid 2038 issue on 32 bit machines.
+ This makes the amq RPC incompatible with older versions
+ of amd. It is too much work to provide backwards compatibility
+ for little benefit, but it can be done.
+ Fix core-dump in amq -i.
+
2016-04-08 Christos Zoulas <christos@zoulas.com>
* Make hasmntval() return an 0 on error, 1 on success and
xdr_amq_mount_tree_node(XDR *xdrs, amq_mount_tree *objp)
{
am_node *mp = (am_node *) objp;
- long mtime;
+ longlong_t mtime;
if (!xdr_amq_string(xdrs, &mp->am_al->al_mnt->mf_info)) {
return (FALSE);
return (FALSE);
}
mtime = mp->am_stats.s_mtime;
- if (!xdr_long(xdrs, &mtime)) {
+ if (!xdr_longlong_t(xdrs, &mtime)) {
return (FALSE);
}
if (!xdr_u_short(xdrs, &mp->am_stats.s_uid)) {
u_int len = 0;
int x;
char *n;
- long modify;
+ longlong_t modify;
/*
* Compute length of list
return (FALSE);
}
- modify = (long)m->modify;
- if (!xdr_long(xdrs, &modify)) {
+ modify = m->modify;
+ if (!xdr_longlong_t(xdrs, &modify)) {
return (FALSE);
}
bool_t
xdr_time_type(XDR *xdrs, time_type *objp)
{
- if (!xdr_long(xdrs, (long *) objp)) {
+ if (!xdr_longlong_t(xdrs, (longlong_t *) objp)) {
return (FALSE);
}
return (TRUE);
/*
* TYPEDEFS
*/
-typedef long *time_type;
+typedef long long time_type;
typedef struct amq_mount_info amq_mount_info;
typedef struct amq_map_info amq_map_info;
typedef struct amq_mount_stats amq_mount_stats;