SET(LOCALSTATES_PREFIX "/var/run/rspamd")
ENDIF(NOT LOCALSTATES_PREFIX)
ENDIF(CMAKE_INSTALL_PREFIX)
-
+ IF(BUILD_CPU_MODE STREQUAL "32")
+ SET(CMAKE_C_FLAGS "-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE ${CMAKE_C_FLAGS}")
+ ENDIF(BUILD_CPU_MODE STREQUAL "32")
# Workaround with architecture specific includes
IF(IS_DIRECTORY "/usr/include/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu/")
INCLUDE_DIRECTORIES("/usr/include/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu/")
* Asynchronous read of file
*/
gint
-rspamd_aio_read (gint fd, gpointer buf, gsize len, off_t offset, struct aio_context *ctx, rspamd_aio_cb cb, gpointer ud)
+rspamd_aio_read (gint fd, gpointer buf, gsize len, guint64 offset, struct aio_context *ctx, rspamd_aio_cb cb, gpointer ud)
{
struct io_cbdata *cbdata;
gint r = -1;
else {
/* Blocking variant */
blocking:
+#ifdef _LARGEFILE64_SOURCE
+ r = lseek64 (fd, offset, SEEK_SET);
+#else
r = lseek (fd, offset, SEEK_SET);
+#endif
if (r > 0) {
r = read (fd, buf, len);
if (r >= 0) {
* Asynchronous write of file
*/
gint
-rspamd_aio_write (gint fd, gpointer buf, gsize len, off_t offset, struct aio_context *ctx, rspamd_aio_cb cb, gpointer ud)
+rspamd_aio_write (gint fd, gpointer buf, gsize len, guint64 offset, struct aio_context *ctx, rspamd_aio_cb cb, gpointer ud)
{
struct io_cbdata *cbdata;
gint r = -1;
else {
/* Blocking variant */
blocking:
+#ifdef _LARGEFILE64_SOURCE
+ r = lseek64 (fd, offset, SEEK_SET);
+#else
r = lseek (fd, offset, SEEK_SET);
+#endif
if (r > 0) {
r = write (fd, buf, len);
if (r >= 0) {
/**
* Asynchronous read of file
*/
-gint rspamd_aio_read (gint fd, gpointer buf, gsize len, off_t offset,
+gint rspamd_aio_read (gint fd, gpointer buf, gsize len, guint64 offset,
struct aio_context *ctx, rspamd_aio_cb cb, gpointer ud);
/**
* Asynchronous write of file
*/
-gint rspamd_aio_write (gint fd, gpointer buf, gsize len, off_t offset,
+gint rspamd_aio_write (gint fd, gpointer buf, gsize len, guint64 offset,
struct aio_context *ctx, rspamd_aio_cb cb, gpointer ud);
/**