diff options
author | Oyvind Repvik <nail@nslu2-linux.org> | 2005-07-11 10:25:30 +0000 |
---|---|---|
committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2005-07-11 10:25:30 +0000 |
commit | 047c20edd445e7210f4e3dcce9d545f71c4cada6 (patch) | |
tree | 817adbee63c8a9bf6b9ed7f200747579ec827477 /packages | |
parent | 53aeb8cb6a60d88703adc6a63703288f77224ff8 (diff) |
Fix samba LINUX_LFS problem in a proper way. FIXES #58 (OE)
Diffstat (limited to 'packages')
-rw-r--r-- | packages/samba/files/config-lfs.patch | 47 | ||||
-rw-r--r-- | packages/samba/files/configure.lfs.patch | 12 | ||||
-rw-r--r-- | packages/samba/samba_3.0.14a.bb | 10 |
3 files changed, 49 insertions, 20 deletions
diff --git a/packages/samba/files/config-lfs.patch b/packages/samba/files/config-lfs.patch new file mode 100644 index 0000000000..b37ed690ce --- /dev/null +++ b/packages/samba/files/config-lfs.patch @@ -0,0 +1,47 @@ +Cache the check for Linux LFS support, so it can be prepopulated from +the site cache for configure variables for cross-compiling. Without this, +samba gets the idea that it can use dirent64 and friends without defining +the flags it needs to get it, such as _GNU_SOURCE and _LARGEFILE64_SOURCE. + +Symptoms of getting the configuration wrong on cross-compile inculde +warnings such as + + smbd/trans2.c: In function `get_lanman2_dir_entry': + smbd/trans2.c:1065: warning: right shift count >= width of type + +and errors like + + smbd/vfs.c:630: error: dereferencing pointer to incomplete type + +(when trying to dereference dirent64.) + +--- source/configure.in.orig 2005-05-29 14:46:18.000000000 -0700 ++++ source/configure.in 2005-05-29 14:51:57.000000000 -0700 +@@ -588,7 +588,7 @@ + # Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support. + # + *linux*) +- AC_MSG_CHECKING([for LFS support]) ++ AC_CACHE_CHECK([for LFS support], samba_cv_LINUX_LFS_SUPPORT,[ + old_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS" + AC_TRY_RUN([ +@@ -627,15 +627,14 @@ + exit(1); + #endif + } +-], [LINUX_LFS_SUPPORT=yes], [LINUX_LFS_SUPPORT=no], [LINUX_LFS_SUPPORT=cross]) +- CPPFLAGS="$old_CPPFLAGS" +- if test x$LINUX_LFS_SUPPORT = xyes ; then ++], [samba_cv_LINUX_LFS_SUPPORT=yes], [samba_cv_LINUX_LFS_SUPPORT=no], [samba_cv_LINUX_LFS_SUPPORT=cross]) ++ CPPFLAGS="$old_CPPFLAGS"]) ++ if test x"$samba_cv_LINUX_LFS_SUPPORT" = x"yes" ; then + CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS" + AC_DEFINE(_LARGEFILE64_SOURCE, 1, [Whether to enable large file support]) + AC_DEFINE(_FILE_OFFSET_BITS, 64, [File offset bits]) + AC_DEFINE(_GNU_SOURCE, 1, [Whether to use GNU libc extensions]) + fi +- AC_MSG_RESULT([$LINUX_LFS_SUPPORT]) + ;; + + # diff --git a/packages/samba/files/configure.lfs.patch b/packages/samba/files/configure.lfs.patch deleted file mode 100644 index f0355ecd8d..0000000000 --- a/packages/samba/files/configure.lfs.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- source/configure.in.virgin 2005-06-27 07:22:15.000000000 +0200 -+++ source/configure.in 2005-06-27 07:23:11.000000000 +0200 -@@ -628,7 +628,8 @@ - #endif - } - ], [LINUX_LFS_SUPPORT=yes], [LINUX_LFS_SUPPORT=no], [LINUX_LFS_SUPPORT=cross]) -- CPPFLAGS="$old_CPPFLAGS" -+# Ugly hack for cross compile. Just set the CPPFLAGS and go on. -+ CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $old_CPPFLAGS" - if test x$LINUX_LFS_SUPPORT = xyes ; then - CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS" - AC_DEFINE(_LARGEFILE64_SOURCE, 1, [Whether to enable large file support]) diff --git a/packages/samba/samba_3.0.14a.bb b/packages/samba/samba_3.0.14a.bb index 68a261cbc1..395decfdf8 100644 --- a/packages/samba/samba_3.0.14a.bb +++ b/packages/samba/samba_3.0.14a.bb @@ -1,15 +1,9 @@ - -PR = "r7" - -# Ugly patch to hack configure.in to set the CPPFLAGS without actually checking for LFS support -# For nslu2. Will probably work for forcing for other archs as well. -LFS_SRC_URI = "" -LFS_SRC_URI_nslu2 = "file://configure.lfs.patch;patch=1" +PR = "r8" SRC_URI = "http://us2.samba.org/samba/ftp/stable/samba-${PV}.tar.gz \ file://configure.patch;patch=1 \ file://cifs.patch;patch=1 \ - ${LFS_SRC_URI} \ + file://config-lfs.patch;patch=1 \ file://init \ file://quota.patch;patch=1;pnum=0 \ " |