[prev in list] [next in list] [prev in thread] [next in thread] 

List:       netatalk
Subject:    [Netatalk-admins] Netatalk 2.0.3 on Solaris 10, compile fix
From:       Ben Taylor <sol10x86 () cox ! net>
Date:       2005-07-19 14:25:24
Message-ID: 20050719142517.FFPP28332.eastrmmtao01.cox.net () smtp ! east ! cox ! net
[Download RAW message or body]

I managed to get netatalk-2.03 to compile under Solaris
10 (and 11 aka Solaris express) using the following
hack.  I suck at autoconf so I'm not sure how to 
go about fixing aclocal.m4 and configure.in, but
the basic premise makes a working netatalk on 
Solaris.

1) fix configure script to add "-R${bdblibdir}" flags to 
lines 15199 and 15945  (This fixes a problem when
linking to libbdb4 during the test phase of the 
configure). Can also use env LD_LIBARRY_PATH=path_to_bdb4 ./configure, but \
LD_LIBRARY_PATH is not a recommended use for Solaris, in general.

2) when configuring, use
   "env RANLIB=echo ./configure....."
as Solaris doesn't (and hasn't used) ranlib

3) once configure succeeds, add to config.h near
where "#define SOLARIS 1" is defined.
#define SOLARIS2 10 # or 8, 9, or 11 depending on your os

This will tell the module whether it can use the 
identify features of the DDI, which were removed in
Solaris 10.  Still works in Solaris 9 and prior.

Using darren reed's ipf code as a model, I found the
solution to the problem for ipf to be useful for netatalk. 
somewhere in configure script, it needs to define a SOLARIS2
variable.  From the ipf Makefile, one way to do that is:

SOLARIS2=`uname -r | sh -c 'IFS=. read j n x; echo $n'`

such that it gets defined into config.h. 

4) patch sys/solaris/tpi.c to handle the case where
DDI_IDENTIFIED/DDI_NOT_IDENTIFIED is not used in 
Solaris 10 and later (I used Darren Reeds' IPF code
as model to fix this, which seems consistent with
the page at http://docs.sun.com/app/docs/doc/817-0552/6mgbi4fha?a=view

--- tpi.c.ORIG  2005-07-19 09:15:48.849157000 -0400
+++ tpi.c       2005-07-19 09:11:48.095635000 -0400
@@ -36,6 +36,7 @@
     return( DDI_FAILURE );
 }
 
+#if SOLARIS2 < 10
     static int
 tpi_identify( dev_info_t *dip )
 {
@@ -49,6 +50,7 @@
        return( DDI_NOT_IDENTIFIED );
     }
 }
+#endif
 
     static int
 tpi_attach( dev_info_t *dip, ddi_attach_cmd_t cmd )
@@ -701,7 +703,11 @@
     DEVO_REV,
     0,
     tpi_getinfo,
+#if SOLARIS2 >= 10
+    nulldev,
+#else
     tpi_identify,
+#endif
     nulldev,
     tpi_attach,
     tpi_detach,



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Netatalk-admins mailing list
Netatalk-admins@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/netatalk-admins


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic