>From f69ee6b8d6d00dfaaf47cda1f73b886528b4c8eb Mon Sep 17 00:00:00 2001
From: Julien / Gellule <gellule.xg@free.fr>
Date: Tue, 30 Mar 2010 09:05:19 -1000
Subject: [PATCH] Fix for trac #3452
 VLC fails to compile on OS X with zlib 1.2.4

This fix actually removes traces of the libc _LARGEFILE64_SOURCE
transitional API.
---
 .../cmake/CMakeLists/root_CMakeLists.txt           |    2 +-
 extras/contrib/src/Makefile                        |    2 +-
 src/vlc-plugin.pc.in                               |    1 -
 vlc-config.in.in                                   |    2 +-
 4 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/extras/buildsystem/cmake/CMakeLists/root_CMakeLists.txt b/extras/buildsystem/cmake/CMakeLists/root_CMakeLists.txt
index 43f9233..337192b 100644
--- a/extras/buildsystem/cmake/CMakeLists/root_CMakeLists.txt
+++ b/extras/buildsystem/cmake/CMakeLists/root_CMakeLists.txt
@@ -18,7 +18,7 @@ include( config )
 add_definitions(-DHAVE_CONFIG_H)
 add_definitions(-D__LIBVLC__)
 # Large file support for Solaris and Linux:
-add_definitions(-D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURCE)
+add_definitions(-D_FILE_OFFSET_BITS=64 -D__USE_UNIX98)
 # Thread safety:
 add_definitions(-D_REENTRANT -D_THREAD_SAFE)
 
diff --git a/extras/contrib/src/Makefile b/extras/contrib/src/Makefile
index 6eca294..2f3d37e 100644
--- a/extras/contrib/src/Makefile
+++ b/extras/contrib/src/Makefile
@@ -1179,7 +1179,7 @@ endif
 ifdef HAVE_WIN32
 	(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --enable-static --prefix=$(PREFIX) && make && make install)
 else
-	(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --enable-static --prefix=$(PREFIX) CFLAGS="$(CFLAGS) -Dlseek64=lseek -Doff64_t=off_t" && make && make install)
+	(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --enable-static --prefix=$(PREFIX) CFLAGS="$(CFLAGS)" && make && make install)
 endif
 	$(INSTALL_NAME)
 	touch $@
diff --git a/src/vlc-plugin.pc.in b/src/vlc-plugin.pc.in
index 0036f39..14da0a9 100644
--- a/src/vlc-plugin.pc.in
+++ b/src/vlc-plugin.pc.in
@@ -11,7 +11,6 @@ Cflags: -I${includedir} -I${pkgincludedir}/plugins \
 	-D__PLUGIN__ \
 	-D_FILE_OFFSET_BITS=64 \
 	-D__USE_UNIX98 \
-	-D_LARGEFILE64_SOURCE \
 	@DEFS_BIGENDIAN@ \
 	-D_REENTRANT \
 	-D_THREAD_SAFE
diff --git a/vlc-config.in.in b/vlc-config.in.in
index e725323..cebc26c 100644
--- a/vlc-config.in.in
+++ b/vlc-config.in.in
@@ -82,7 +82,7 @@ linkage="c"
 #
 #  On Linux and Solaris, activate 64-bit off_t (by default under BSD)
 #
-cppflags="${cppflags} -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURCE -D_REENTRANT -D_THREAD_SAFE"
+cppflags="${cppflags} -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_REENTRANT -D_THREAD_SAFE"
 
 #
 #  Various additional defines
-- 
1.6.3

