aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr>2018-04-12 20:49:49 +0200
committerAlbert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr>2018-10-24 12:53:27 +0200
commit6b7f0b49b4a0f5c709af9ea15510b4335cd1a51e (patch)
treef7546f0a245b1309a1051158c3b0b918261882e4
parent86df3efa3c9429c132bc7c39dcb2575b4eac440c (diff)
downloadglibc-6b7f0b49b4a0f5c709af9ea15510b4335cd1a51e.zip
glibc-6b7f0b49b4a0f5c709af9ea15510b4335cd1a51e.tar.gz
glibc-6b7f0b49b4a0f5c709af9ea15510b4335cd1a51e.tar.bz2
Y2038: add function __clntudp_bufcreate64
-rw-r--r--sunrpc/clnt_udp.c18
-rw-r--r--sunrpc/rpc/clnt.h12
2 files changed, 30 insertions, 0 deletions
diff --git a/sunrpc/clnt_udp.c b/sunrpc/clnt_udp.c
index 27a3244..0892ae3 100644
--- a/sunrpc/clnt_udp.c
+++ b/sunrpc/clnt_udp.c
@@ -663,3 +663,21 @@ __clntudp_create64 (struct sockaddr_in *raddr, u_long program, u_long version,
return clntudp_create (raddr, program, version, wait32, sockp);
}
+
+CLIENT *
+__clntudp_bufcreate64 (struct sockaddr_in *raddr, u_long program, u_long version,
+ struct __timeval64 wait, int *sockp, u_int sendsz,
+ u_int recvsz)
+{
+ struct timeval wait32;
+
+ if (wait.tv_sec > INT_MAX)
+ {
+ return NULL;
+ }
+
+ wait32.tv_sec = wait.tv_sec;
+ wait32.tv_usec = wait.tv_usec;
+
+ return clntudp_bufcreate (raddr, program, version, wait32, sockp, sendsz, recvsz);
+}
diff --git a/sunrpc/rpc/clnt.h b/sunrpc/rpc/clnt.h
index b24b5cc..a6dff89 100644
--- a/sunrpc/rpc/clnt.h
+++ b/sunrpc/rpc/clnt.h
@@ -344,6 +344,18 @@ extern CLIENT * __REDIRECT (clntudp_create,(struct sockaddr_in *__raddr,
extern CLIENT *clntudp_create (struct sockaddr_in *__raddr, u_long __program,
u_long __version, struct timeval __wait_resend,
int *__sockp) __THROW;
+#ifdef __USE_TIME_BITS64
+# if defined(__REDIRECT)
+extern CLIENT * __REDIRECT (clntudp_bufcreate,(struct sockaddr_in *__raddr,
+ u_long __program, u_long __version,
+ struct __timeval64 __wait_resend,
+ int *__sockp, u_int __sendsz,
+ u_int __recvsz),
+ __clntudp_bufcreate64) __THROW;
+# else
+# define clntudp_bufcreate __clntudp_bufcreate64
+# endif
+#endif
extern CLIENT *clntudp_bufcreate (struct sockaddr_in *__raddr,
u_long __program, u_long __version,
struct timeval __wait_resend, int *__sockp,