]> arthur.barton.de Git - netatalk.git/commitdiff
Backport from 1.6 branch: Fixes for Linux kernel 2.6 headers.
authorsrittau <srittau>
Mon, 15 Dec 2003 04:33:28 +0000 (04:33 +0000)
committersrittau <srittau>
Mon, 15 Dec 2003 04:33:28 +0000 (04:33 +0000)
configure.in
sys/netatalk/at.h

index dbf8e3c0cf27203bc153f7b243e83853eda468cb..84753a66c018f2e185c409d663d3663d66eccee8 100644 (file)
@@ -1,4 +1,4 @@
-dnl $Id: configure.in,v 1.191 2003-09-03 18:27:13 samnoble Exp $
+dnl $Id: configure.in,v 1.192 2003-12-15 04:33:28 srittau Exp $
 dnl configure.in for netatalk
 
 AC_INIT(etc/afpd/main.c)
@@ -500,9 +500,33 @@ if test x"$this_os" = "xirix"; then
 fi
 
 dnl ----- Linux specific -----
+ac_have_atalk_addr=no
 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_FUNC(quotactl,,
                AC_DEFINE(NEED_QUOTACTL_WRAPPER, 1, [Define if the quotactl wrapper is needed])
index 3a38a7e70fd76af3eab5f8d3e5f589f4476bfacc..ebe96bc15653c3375807009b879575fa47f31be1 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.4 2003-12-15 04:33:28 srittau Exp $
  *
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  *
 #define __AT_HEADER__
 
 #if defined(linux) /* pull in the linux header */
+
 #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>