[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r35899 - in libmicrohttpd: . src/microhttpd
From: |
gnunet |
Subject: |
[GNUnet-SVN] r35899 - in libmicrohttpd: . src/microhttpd |
Date: |
Tue, 9 Jun 2015 21:34:15 +0200 |
Author: Karlson2k
Date: 2015-06-09 21:34:14 +0200 (Tue, 09 Jun 2015)
New Revision: 35899
Modified:
libmicrohttpd/configure.ac
libmicrohttpd/src/microhttpd/response.c
Log:
response.c: file_reader(): add support for Linux hosts with 64-bit seek, but
with 32-bit off_t (Android)
Modified: libmicrohttpd/configure.ac
===================================================================
--- libmicrohttpd/configure.ac 2015-06-09 19:34:07 UTC (rev 35898)
+++ libmicrohttpd/configure.ac 2015-06-09 19:34:14 UTC (rev 35899)
@@ -608,7 +608,7 @@
# large file support (> 4 GB)
AC_SYS_LARGEFILE
AC_FUNC_FSEEKO
-AC_CHECK_FUNCS([_lseeki64])
+AC_CHECK_FUNCS([_lseeki64 lseek64])
# optional: have error messages ?
AC_MSG_CHECKING(whether to generate error messages)
Modified: libmicrohttpd/src/microhttpd/response.c
===================================================================
--- libmicrohttpd/src/microhttpd/response.c 2015-06-09 19:34:07 UTC (rev
35898)
+++ libmicrohttpd/src/microhttpd/response.c 2015-06-09 19:34:14 UTC (rev
35899)
@@ -329,7 +329,10 @@
if (offset64 < 0)
return MHD_CONTENT_READER_END_WITH_ERROR; /* seek to required position is
not possible */
-#if defined(HAVE___LSEEKI64)
+#if defined(HAVE_LSEEK64)
+ if (lseek64 (response->fd, offset64, SEEK_SET) != offset64)
+ return MHD_CONTENT_READER_END_WITH_ERROR; /* can't seek to required
position */
+#elif defined(HAVE___LSEEKI64)
if (_lseeki64 (response->fd, offset64, SEEK_SET) != offset64)
return MHD_CONTENT_READER_END_WITH_ERROR; /* can't seek to required
position */
#else /* !HAVE___LSEEKI64 */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r35899 - in libmicrohttpd: . src/microhttpd,
gnunet <=