Initial import
[samba] / debian / patches / non-linux-ports.patch
diff --git a/debian/patches/non-linux-ports.patch b/debian/patches/non-linux-ports.patch
new file mode 100644 (file)
index 0000000..365ef40
--- /dev/null
@@ -0,0 +1,63 @@
+Index: samba-3.0.21c/source/configure.in
+===================================================================
+--- samba-3.0.21c.orig/source/configure.in     2006-02-25 11:58:15.771410155 +0100
++++ samba-3.0.21c/source/configure.in  2006-02-25 11:58:20.524451106 +0100
+@@ -639,6 +639,15 @@
+       fi
+     ;;
++# Systems with LFS support.
++#
++    gnu* | k*bsd*-gnu)
++      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])
++      ;;
++
+ # Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
+ #
+     *linux*)
+@@ -1198,7 +1207,7 @@
+ # 
+ #
+ case "$host_os" in
+-    *linux*)
++    linux*-gnu* | gnu* | k*bsd*-gnu)
+        # glibc <= 2.3.2 has a broken getgrouplist
+        AC_TRY_RUN([
+ #include <unistd.h>
+@@ -1405,7 +1414,10 @@
+   # and these are for particular systems
+   case "$host_os" in
+-              *linux*)   AC_DEFINE(LINUX,1,[Whether the host os is linux])
++              linux*-gnu* | gnu* | k*bsd*-gnu)
++                      case "$host_os" in linux*)
++                              AC_DEFINE(LINUX,1,[Whether the host os is linux]) ;;
++                      esac
+                       BLDSHARED="true"
+                       if test "${ac_cv_gnu_ld_no_default_allow_shlib_undefined}" = "yes"; then
+                               LDSHFLAGS="-shared -Wl,-Bsymbolic -Wl,--allow-shlib-undefined" 
+@@ -4654,7 +4666,7 @@
+       AC_MSG_RESULT(yes);
+       case "$host_os" in
+-      *linux*)
++      linux*-gnu* | gnu* | k*bsd*-gnu)
+               AC_CACHE_CHECK([for linux sendfile64 support],samba_cv_HAVE_SENDFILE64,[
+               AC_TRY_LINK([#include <sys/sendfile.h>],
+ [\
+@@ -4917,10 +4929,10 @@
+ WINBIND_NSS_LDSHFLAGS=$LDSHFLAGS
+ case "$host_os" in
+-      *linux*)
++      linux*-gnu* | gnu* | k*bsd*-gnu)
+               WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_linux.o"
+               ;;
+-      *freebsd[[5-9]]*)
++      freebsd5*|*freebsd[[6-9]]*)
+               # FreeBSD winbind client is implemented as a wrapper around
+               # the Linux version.
+               WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_freebsd.o \