Hello, I had to compile ganglia-3.0.7 for amd64 support on Debian
etch.  The changes I had to make are below.  It consists of replacing
deprecated APR function calls with what I understood their
replacements are.

Additionally, I had to add "-lexpat -lconfuse -ldl -lapr-1" to
LDFLAGS.  Hopefully this is useful to anyone else out there trying to
accomplish the same thing.  This has been lightly tested on i386 and
amd64.

I don't have experience making official packages, but if there is
enough interest, I'll give it a shot.

Jim

--- ganglia-3.0.7/lib/apr_net.c 2008-04-15 23:41:10.000000000 +0000
+++ ganglia-3.0.7-debian/lib/apr_net.c  2008-02-27 23:15:19.000000000 +0000
@@ -77,7 +77,7 @@
     }

   /* Connect the socket to the address */
-  status = apr_socket_connect(sock, remotesa);
+  status = apr_connect(sock, remotesa);
   if(status != APR_SUCCESS)
     {
       apr_socket_close(sock);
@@ -121,7 +121,7 @@

   if(!blocking){
      /* This is a non-blocking server */
-     stat = apr_socket_opt_set(sock, APR_SO_NONBLOCK, 1);
+     stat = apr_setsocketopt(sock, APR_SO_NONBLOCK, 1);
      if (stat != APR_SUCCESS)
      {
            apr_socket_close(sock);
@@ -129,7 +129,7 @@
      }
   }

-  stat = apr_socket_opt_set(sock, APR_SO_REUSEADDR, 1);
+  stat = apr_setsocketopt(sock, APR_SO_REUSEADDR, 1);
   if (stat != APR_SUCCESS)
     {
       apr_socket_close(sock);
@@ -139,10 +139,7 @@
   if(!localsa)
     {
       apr_socket_addr_get(&localsa, APR_LOCAL, sock);
-      // apr_sockaddr_port_set(localsa, port); Deprecated: See also:
apr_sockaddr_info_get
-      stat = apr_sockaddr_info_get(&localsa, bind_addr, APR_UNSPEC,
port, 0, context);
-      if (stat != APR_SUCCESS)
-        return NULL;
+      apr_sockaddr_port_set(localsa, port);
     }

 #if APR_HAVE_IPV6
@@ -161,7 +158,7 @@
      }
  #endif

-  stat = apr_socket_bind(sock, localsa);
+  stat = apr_bind(sock, localsa);
   if( stat != APR_SUCCESS)
     {
        apr_socket_close(sock);
@@ -188,7 +185,7 @@
     {
       return NULL;
     }
-  if(apr_socket_listen(sock, 5) != APR_SUCCESS)
+  if(apr_listen(sock, 5) != APR_SUCCESS)
     {
       return NULL;
     }
-- 
Cure Diabetes! I'm cycling 300 miles for Tour de Cure, a series of
fundraising rides.  Support us here: http://tinyurl.com/56fa8k

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Ganglia-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ganglia-developers

Reply via email to