From: Nicolas Thill Date: Tue, 23 Sep 2008 21:45:46 +0000 (+0000) Subject: fix large file support in samba3 (closes: #4014) X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=7eb00776bf5e0cb05e3a5a9d5efbf05c663eb61c;p=openwrt%2Fsvn-archive%2Fpackages.git fix large file support in samba3 (closes: #4014) SVN-Revision: 12676 --- diff --git a/net/samba3/Makefile b/net/samba3/Makefile index be69a4504..59c1e390b 100644 --- a/net/samba3/Makefile +++ b/net/samba3/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=samba3 PKG_VERSION:=3.0.24 -PKG_RELEASE:=1 +PKG_RELEASE:=2 #PKG_MD5SUM:=b51b2975f21006f85f7297f3fb1acde1 PKG_SOURCE_URL:=ftp://ftp.samba.org/pub/samba/old-versions/ @@ -35,13 +35,24 @@ define Package/samba3/config source "$(SOURCE)/Config.in" endef +ifneq ($(CONFIG_LARGEFILE),) + define Build/Prepare/LFS + cat ./files/config-lfs.h >> $(PKG_BUILD_DIR)/source/include/config.h + endef +endif + +define Build/Prepare +$(call Build/Prepare/Default) +$(call Build/Prepare/LFS) +endef + define Build/Compile - CFLAGS="$(TARGET_CFLAGS) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE" \ CC="$(TARGET_CC)" \ - CPPFLAGS="$(TARGET_CPPFLAGS) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE" \ + CFLAGS="$(TARGET_CFLAGS)" \ + CPPFLAGS="$(TARGET_CPPFLAGS)" \ LDFLAGS="$(TARGET_LDFLAGS)" \ - $(MAKE) -C $(PKG_BUILD_DIR)/source \ - all bin/smbpasswd + $(MAKE) -C $(PKG_BUILD_DIR)/source \ + all bin/smbpasswd endef define Package/samba3/install diff --git a/net/samba3/files/config-lfs.h b/net/samba3/files/config-lfs.h new file mode 100644 index 000000000..128e8a526 --- /dev/null +++ b/net/samba3/files/config-lfs.h @@ -0,0 +1,56 @@ +#undef HAVE_CREAT64 +#define HAVE_CREAT64 1 + +#undef HAVE_FSEEKO64 +#define HAVE_FSEEKO64 1 + +#undef HAVE_FSTAT64 +#define HAVE_FSTAT64 1 + +#undef HAVE_FTELLO64 +#define HAVE_FTELLO64 1 + +#undef HAVE_FTRUNCATE64 +#define HAVE_FTRUNCATE64 1 + +#undef HAVE_LSEEK64 +#define HAVE_LSEEK64 1 + +#undef HAVE_LSTAT64 +#define HAVE_LSTAT64 1 + +#undef HAVE_OPEN64 +#define HAVE_OPEN64 1 + +#undef HAVE_PREAD64 +#define HAVE_PREAD64 1 + +#undef HAVE_PWRITE64 +#define HAVE_PWRITE64 1 + +#undef HAVE_READDIR64 +#define HAVE_READDIR64 1 + +#undef HAVE_STAT64 +#define HAVE_STAT64 1 + +#undef HAVE_STRUCT_FLOCK64 +#define HAVE_STRUCT_FLOCK64 1 + +#undef SIZEOF_LONG_LONG +#define SIZEOF_LONG_LONG 8 + +#undef SIZEOF_OFF_T +#define SIZEOF_OFF_T 8 + +#undef _FILE_OFFSET_BITS +#define _FILE_OFFSET_BITS 64 + +#undef _GNU_SOURCE +#define _GNU_SOURCE 1 + +#undef _LARGEFILE_SOURCE +#define _LARGEFILE_SOURCE 1 + +#undef _LARGEFILE64_SOURCE +#define _LARGEFILE64_SOURCE 1