]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
hurd: avoid PLT ref between sendfile and sendfile64
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Fri, 15 Jun 2018 22:44:17 +0000 (00:44 +0200)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Fri, 15 Jun 2018 22:44:57 +0000 (00:44 +0200)
* include/sys/sendfile.h (__sendfile64): Declare hidden prototype.
* sysdeps/mach/hurd/sendfile.c (sendfile): Call __sendfile64 instead
of sendfile.
* sysdeps/mach/hurd/sendfile64.c (sendfile64): Rename to __sendfile64.
(sendfile64): New strong alias.

ChangeLog
include/sys/sendfile.h
sysdeps/mach/hurd/sendfile.c
sysdeps/mach/hurd/sendfile64.c

index a8f711fcd7ae18a8fed55ead7b7a7d874138be7a..74c14d4f84c67472e2e65ab930b04b65db631f02 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2018-06-15  Samuel Thibault  <samuel.thibault@ens-lyon.org>
+
+       * include/sys/sendfile.h (__sendfile64): Declare hidden prototype.
+       * sysdeps/mach/hurd/sendfile.c (sendfile): Call __sendfile64 instead
+       of sendfile.
+       * sysdeps/mach/hurd/sendfile64.c (sendfile64): Rename to __sendfile64.
+       (sendfile64): New strong alias.
+
 2018-06-15  Joseph Myers  <joseph@codesourcery.com>
 
        [BZ #23007]
index abe09769cca3b963a211e8836f551883f3074ca4..b88cca27b87cd603fcfae4923ea4a5d34bf65d2d 100644 (file)
@@ -1 +1,7 @@
 #include <io/sys/sendfile.h>
+
+#ifndef _ISOMAC
+
+extern __typeof (sendfile64) __sendfile64 attribute_hidden;
+
+#endif
index 6a3de0fcc1293767ca6db4bcf79f82a12a7b5e01..4df66b56d714701206d802596d962f673ef60df9 100644 (file)
@@ -25,11 +25,11 @@ ssize_t
 sendfile (int out_fd, int in_fd, off_t *offset, size_t count)
 {
   if (offset == NULL || sizeof (off_t) == sizeof (off64_t))
-    return sendfile64 (out_fd, in_fd, (off64_t *) offset, count);
+    return __sendfile64 (out_fd, in_fd, (off64_t *) offset, count);
   else
     {
       off64_t ofs = *offset;
-      ssize_t ret = sendfile64 (out_fd, in_fd, &ofs, count);
+      ssize_t ret = __sendfile64 (out_fd, in_fd, &ofs, count);
       *offset = ofs;
       return ret;
     }
index f69ccd4a79f962c1695ccb02704803c101558cf6..ea4e96da90cd3edb43fda73368cff875744eeede 100644 (file)
@@ -24,7 +24,7 @@
 /* Send COUNT bytes from file associated with IN_FD starting at OFFSET to
    descriptor OUT_FD.  */
 ssize_t
-sendfile64 (int out_fd, int in_fd, off64_t *offset, size_t count)
+__sendfile64 (int out_fd, int in_fd, off64_t *offset, size_t count)
 {
   /* We just do a vanilla io_read followed by a vanilla io_write here.
      In theory the IN_FD filesystem can return us out-of-line data that
@@ -57,3 +57,4 @@ sendfile64 (int out_fd, int in_fd, off64_t *offset, size_t count)
     }
   return __hurd_fail (err);
 }
+strong_alias (__sendfile64, sendfile64)