]> arthur.barton.de Git - netatalk.git/commitdiff
configure change for linux 2.6 from Thomas Kaiser
authordidg <didg>
Fri, 12 Dec 2003 19:29:55 +0000 (19:29 +0000)
committerdidg <didg>
Fri, 12 Dec 2003 19:29:55 +0000 (19:29 +0000)
configure.in
sys/netatalk/at.h

index 0b086f4fcd26be2a74ba5fdeb94acfae2151fa60..5a9ed7c958af5763cf83222750b071879ca33311 100644 (file)
@@ -1,4 +1,4 @@
-dnl $Id: configure.in,v 1.179.2.3.2.13 2003-12-03 15:21:36 lenneis Exp $
+dnl $Id: configure.in,v 1.179.2.3.2.14 2003-12-12 19:29:55 didg Exp $
 dnl configure.in for netatalk
 
 AC_INIT(etc/afpd/main.c)
@@ -594,6 +594,29 @@ fi
 dnl ----- Linux specific -----
 if test x"$this_os" = "xlinux"; then 
        AC_MSG_RESULT([ * Linux specific configuration])
+       
+       dnl ----- kernel 2.6 changed struct at_addr to atalk_addr
+       AC_MSG_CHECKING([for struct atalk_addr])
+       AC_COMPILE_IFELSE([
+#include <sys/socket.h>
+#include <asm/types.h>
+#include <linux/atalk.h>
+
+int main() {
+       struct atalk_addr foo;
+
+       return 0;
+}
+       ], [
+               ac_have_atalk_addr=yes
+               AC_MSG_RESULT([yes])
+       ], [
+               AC_MSG_RESULT([no])
+       ])
+
+if test "x$ac_have_atalk_addr" = "xyes"; then
+       AC_DEFINE(HAVE_ATALK_ADDR, 1, [set if struct at_addr is called atalk_addr])
+fi
 
        dnl ----- check if we need the quotactl wrapper
 #      AC_CHECK_HEADERS(sys/quota.h linux/quota.h)
@@ -933,3 +956,4 @@ AC_OUTPUT([Makefile
 AM_NETATALK_LIBS_SUMMARY
 AM_NETATALK_CONFIG_SUMMARY
 
+
index 3a38a7e70fd76af3eab5f8d3e5f589f4476bfacc..b9214bef43f672c4c548299551758798406ad2c7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: at.h,v 1.3 2001-11-25 21:55:10 srittau Exp $
+ * $Id: at.h,v 1.3.10.1 2003-12-12 19:29:55 didg Exp $
  *
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  *
 #include <sys/socket.h>
 #include <asm/types.h>
 #include <linux/atalk.h>
+
+#ifdef HAVE_ATALK_ADDR
+#define at_addr atalk_addr
+#define netrange atalk_netrange
+#endif /* HAVE_ATALK_ADDR */
+
 #else /* linux */
 
 #include <sys/types.h>
@@ -121,3 +127,4 @@ extern struct protosw       atalksw[];
 
 #endif /* linux */
 #endif /* __AT_HEADER__ */
+