]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix the Android port
authorPo Lu <luangruo@yahoo.com>
Mon, 14 Jul 2025 13:41:18 +0000 (21:41 +0800)
committerEshel Yaron <me@eshelyaron.com>
Thu, 24 Jul 2025 08:50:49 +0000 (10:50 +0200)
* src/fileio.c (emacs_full_read): Retype FD param to `emacs_fd'.
(Fcopy_file): Label newsize MAYBE_UNUSED.

(cherry picked from commit b2d5e4fe40b56913c9282b3e584336fed47474d2)

src/fileio.c

index 12f3aede01896dd56dfe525869f6713f394588e5..9ac6f4b1fa871891d353bcd49903d19447c89981 100644 (file)
@@ -2225,7 +2225,7 @@ barf_or_query_if_file_exists (Lisp_Object absname, bool known_to_exist,
    On success, return the read count, which is less than BUFSIZE at EOF.
    Return -1 on failure, setting errno and possibly setting BUF.  */
 static ptrdiff_t
-emacs_full_read (int fd, void *buf, ptrdiff_t bufsize)
+emacs_full_read (emacs_fd fd, void *buf, ptrdiff_t bufsize)
 {
   char *b = buf;
   ptrdiff_t nread = 0, r;
@@ -2406,7 +2406,7 @@ permissions.  */)
   if (emacs_fd_to_int (ifd) == -1
       || !clone_file (ofd, emacs_fd_to_int (ifd)))
     {
-      off_t newsize = 0;
+      MAYBE_UNUSED off_t newsize = 0;
 
 #ifndef MSDOS
       if (emacs_fd_to_int (ifd) != -1)