]> arthur.barton.de Git - netatalk.git/commitdiff
Fixed a compilation problem with Linux 2.6 kernel headers.
authorsrittau <srittau>
Sun, 30 Nov 2003 14:54:55 +0000 (14:54 +0000)
committersrittau <srittau>
Sun, 30 Nov 2003 14:54:55 +0000 (14:54 +0000)
NEWS
configure.in
sys/netatalk/at.h

diff --git a/NEWS b/NEWS
index 8b7ec7919cc1791794a4397fdc26581637dc5d4d..45decd5128bc5262ecf2713d1b674340ccf442cf 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,7 @@ Changes in 1.6.4
 * FIX: configure: Removed broken --with-flock-locks option. [Björn Fernhomberg]
 * FIX: libatalk: Do not log network probe (OSX 10.3). [Didier Gautheron]
 * FIX: libatalk: Deadlock in signal handlers. [Didier]
+* FIX: libatalk: Compilation with Linux kernel 2.6 fixed. [Sebastian]
 * FIX: afpd: Solaris compile issues. [Björn]
 * FIX: afpd: If connection broke in dsi_tickle the child did never die. [Björn]
 * FIX: afpd: Catsearch, fixes a possible segmentation fault. [Björn]
index e8849945625d80c92355b8a95b331050ee1b35ea..a1c1faff31c5b9baebcb5eb5c00727f3a09b58c9 100644 (file)
@@ -1,4 +1,4 @@
-dnl $Id: configure.in,v 1.168.2.7 2003-11-20 17:21:00 bfernhomberg Exp $
+dnl $Id: configure.in,v 1.168.2.8 2003-11-30 14:54:55 srittau Exp $
 dnl configure.in for netatalk
 
 AC_INIT(bin/adv1tov2/adv1tov2.c)
@@ -478,9 +478,29 @@ 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])
+       ])
+
        dnl ----- check if we need the quotactl wrapper
        AC_CHECK_HEADERS(sys/quota.h linux/quota.h)
        AC_CHECK_FUNC(quotactl,,
@@ -515,6 +535,7 @@ if test x"$this_os" = "xlinux"; then
        fi
        need_dash_r=no
 fi
+AC_DEFINE(HAVE_ATALK_ADDR, [test "x$ac_have_atalk_addr" = "xyes"], [set if struct at_addr is called atalk_addr])
 
 dnl ----- Mac OSX specific -----
 if test x"$this_os" = "xmacosx"; then 
index 3a38a7e70fd76af3eab5f8d3e5f589f4476bfacc..a68e31cbc47bc699362a5d7cba64ba67225ec9ee 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.4.1 2003-11-30 14:54:56 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
+#endif /* HAVE_ATALK_ADDR */
+
 #else /* linux */
 
 #include <sys/types.h>