summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2011-06-30 21:29:42 +0200
committerVicent Marti <tanoku@gmail.com>2011-06-30 22:28:19 +0200
commitb2cef77ccf52b1fb55f8e1ca98ada48bbfe90b92 (patch)
treecefa586968fb7c32ba4523a2ee4868c93a6b4c5d
parent8a0620030cc2159b361613d07cff508355b8fbdb (diff)
downloadlibgit2-b2cef77ccf52b1fb55f8e1ca98ada48bbfe90b92.tar.gz
common: Force 64 bit fileops at compile time
-rw-r--r--CMakeLists.txt2
-rw-r--r--src/common.h4
2 files changed, 2 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 730fe4bb8..6e48adbda 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -72,6 +72,8 @@ IF (WIN32 AND NOT CYGWIN)
FILE(GLOB SRC_PLAT src/win32/*.c)
ENDIF ()
+ADD_DEFINITIONS(-D_FILE_OFFSET_BITS=64)
+
# Compile and link libgit2
ADD_LIBRARY(git2 ${SRC} ${SRC_PLAT} ${SRC_SHA1} ${SRC_ZLIB})
TARGET_LINK_LIBRARIES(git2 ${CMAKE_THREAD_LIBS_INIT})
diff --git a/src/common.h b/src/common.h
index b6a6b4d5c..b6d8ae3a4 100644
--- a/src/common.h
+++ b/src/common.h
@@ -2,10 +2,6 @@
#define INCLUDE_common_h__
#include "git2/common.h"
-
-/** Force 64 bit off_t size on POSIX. */
-#define _FILE_OFFSET_BITS 64
-
#include "git2/thread-utils.h"
#include "cc-compat.h"