[torqueusers] Torque GSSAPI branch: compiling on AIX 5.3

Alessandro Federico alessandro.federico at caspur.it
Mon Jul 9 10:34:58 MDT 2007


Hi,

I found two errors compiling Torque GSSAPI branch on AIX 5.3.

1) src/lib/Libnet/get_hostnamefromaddr.c must include sys/socket.h
    in order to define the macro AF_INET. this is because on AIX
    the header netinet/in.h doesn't include sys/socket.h as in Linux.

2) in src/server/job_func.c (line 535) h_errno must be defined only
    if H_ERRNO_DECLARED is not.

Regards,
Ale

-- 
  Alessandro Federico
  CASPUR     http://www.caspur.it/
  e-mail:    alessandro.federico at caspur.it
  phone:     +39 06 44486708
  fax:       +39 06 4957083
------------------------------------------
  Military intelligence is a contradiction
  in terms.                 (Groucho Marx)
------------------------------------------


-------------- next part --------------
diff -uNr gssapi.ORIG/src/lib/Libnet/get_hostnamefromaddr.c gssapi/src/lib/Libnet/get_hostnamefromaddr.c
--- gssapi.ORIG/src/lib/Libnet/get_hostnamefromaddr.c	2007-07-06 16:40:49.000000000 +0200
+++ gssapi/src/lib/Libnet/get_hostnamefromaddr.c	2007-07-06 16:41:02.000000000 +0200
@@ -3,6 +3,7 @@
 #include <string.h>
 #include <netinet/in.h>
 #include <netdb.h>
+#include <sys/socket.h>
 #include "dis.h"
 #include "net_connect.h"
 
diff -uNr gssapi.ORIG/src/server/job_func.c gssapi/src/server/job_func.c
--- gssapi.ORIG/src/server/job_func.c	2007-07-06 17:33:45.000000000 +0200
+++ gssapi/src/server/job_func.c	2007-07-06 17:34:06.000000000 +0200
@@ -532,7 +532,9 @@
 
   if ((hostaddr = get_hostaddr(hostname)) == (pbs_net_t)0)
     {
+#if !defined(H_ERRNO_DECLARED)
     extern int h_errno;
+#endif
 
     /* FAILURE */
 


More information about the torqueusers mailing list