I am trying to compile the pam_radius-1.3.16 modules on a Solaris 10 system, but when I run make, I get the following error: gcc -Wall -fPIC -c pam_radius_auth.c -o pam_radius_auth.o In file included from pam_radius_auth.h:23, from pam_radius_auth.c:63: md5.h:21: error: syntax error before 'u_int32_t' md5.h:21: warning: no semicolon at end of struct or union md5.h:22: warning: type defaults to 'int' in declaration of 'bits' md5.h:22: warning: data definition has no type or storage class md5.h:24: error: syntax error before '}' token md5.h:29: error: syntax error before 'buf' pam_radius_auth.c: In function 'get_random_vector': pam_radius_auth.c:350: error: storage size of 'my_md5' isn't known pam_radius_auth.c:350: warning: unused variable 'my_md5' pam_radius_auth.c: In function 'get_accounting_vector': pam_radius_auth.c:382: error: storage size of 'my_md5' isn't known pam_radius_auth.c:382: warning: unused variable 'my_md5' pam_radius_auth.c: In function 'verify_packet': pam_radius_auth.c:400: error: storage size of 'my_md5' isn't known pam_radius_auth.c:400: warning: unused variable 'my_md5' pam_radius_auth.c: In function 'add_password': pam_radius_auth.c:497: error: storage size of 'md5_secret' isn't known pam_radius_auth.c:497: error: storage size of 'my_md5' isn't known pam_radius_auth.c:497: warning: unused variable 'my_md5' pam_radius_auth.c:497: warning: unused variable 'md5_secret' pam_radius_auth.c: In function 'rad_converse': pam_radius_auth.c:1016: warning: passing argument 3 of 'pam_get_item' from incompatible pointer type pam_radius_auth.c:1019: warning: passing argument 2 of 'conv->conv' from incompatible pointer type pam_radius_auth.c: In function 'pam_sm_authenticate': pam_radius_auth.c:1071: warning: passing argument 2 of 'pam_get_user' from incompatible pointer type pam_radius_auth.c:1099: warning: passing argument 3 of 'pam_get_item' from incompatible pointer type pam_radius_auth.c:1113: warning: passing argument 3 of 'pam_get_item' from incompatible pointer type pam_radius_auth.c:1146: warning: passing argument 3 of 'pam_get_item' from incompatible pointer type pam_radius_auth.c: In function 'pam_private_session': pam_radius_auth.c:1267: warning: passing argument 2 of 'pam_get_user' from incompatible pointer type pam_radius_auth.c:1288: warning: passing argument 3 of 'pam_get_item' from incompatible pointer type pam_radius_auth.c: In function 'pam_sm_chauthtok': pam_radius_auth.c:1374: warning: passing argument 2 of 'pam_get_user' from incompatible pointer type pam_radius_auth.c:1395: warning: passing argument 3 of 'pam_get_item' from incompatible pointer type pam_radius_auth.c:1404: warning: passing argument 3 of 'pam_get_item' from incompatible pointer type pam_radius_auth.c:1409: warning: passing argument 3 of 'pam_get_item' from incompatible pointer type gmake: *** [pam_radius_auth.o] Error 1 The same is true when I use the Sun cc (Studio 11 compiler). I am using gcc 4.0.2 (the most recent version I could get to run on Solaris). Output of uname -a is: SunOS xxxx 5.10 Generic_118833-36 sun4u sparc SUNW,A70 Does anyone have a suggestion as to how to modify the header file to make it work or know where I can find pre-compiled modules for Solaris?
On 3/15/07, Paul Goodman <pgoodman@ucar.edu> wrote:
I am trying to compile the pam_radius-1.3.16 modules on a Solaris 10 system, but when I run make, I get the following error:
gcc -Wall -fPIC -c pam_radius_auth.c -o pam_radius_auth.o In file included from pam_radius_auth.h:23, from pam_radius_auth.c:63: md5.h:21: error: syntax error before 'u_int32_t'
Following patch worked for me: ---- 8< ---- diff -ruN pam_radius-1.3.16/Makefile pam_radius-1.3.16-solaris10/Makefile --- pam_radius-1.3.16/Makefile 2003-09-19 16:41:45.000000000 +0200 +++ pam_radius-1.3.16-solaris10/Makefile 2006-11-21 18:13:26.000000000 +0100 @@ -23,6 +23,8 @@ # Then copy pam_radius_auth.so to /usr/freeware/lib32/security (PAM dir) # CFLAGS = +CC=gcc + ###################################################################### # @@ -55,7 +57,7 @@ # gcc -shared pam_radius_auth.o md5.o -lpam -lc -o pam_radius_auth.so # pam_radius_auth.so: pam_radius_auth.o md5.o - ld -Bshareable pam_radius_auth.o md5.o -lpam -o pam_radius_auth.so + ld -G pam_radius_auth.o md5.o -lpam -o pam_radius_auth.so -lsocket ###################################################################### # diff -ruN pam_radius-1.3.16/md5.h pam_radius-1.3.16-solaris10/md5.h --- pam_radius-1.3.16/md5.h 2003-04-29 22:19:16.000000000 +0200 +++ pam_radius-1.3.16-solaris10/md5.h 2006-11-21 18:13:46.000000000 +0100 @@ -15,7 +15,7 @@ #define MD5Transform pra_MD5Transform #include <sys/types.h> -#define uint32 u_int32_t +#define uint32 uint32_t struct MD5Context { uint32 buf[4]; ---- 8< ---- You may not need Makefile-related part, depending on what compiler / linker you're going to use... th.
That did it, thank you! Tomas Hoger wrote:
On 3/15/07, Paul Goodman <pgoodman@ucar.edu> wrote:
I am trying to compile the pam_radius-1.3.16 modules on a Solaris 10 system, but when I run make, I get the following error:
gcc -Wall -fPIC -c pam_radius_auth.c -o pam_radius_auth.o In file included from pam_radius_auth.h:23, from pam_radius_auth.c:63: md5.h:21: error: syntax error before 'u_int32_t'
Following patch worked for me:
---- 8< ----
diff -ruN pam_radius-1.3.16/Makefile pam_radius-1.3.16-solaris10/Makefile --- pam_radius-1.3.16/Makefile 2003-09-19 16:41:45.000000000 +0200 +++ pam_radius-1.3.16-solaris10/Makefile 2006-11-21 18:13:26.000000000 +0100 @@ -23,6 +23,8 @@ # Then copy pam_radius_auth.so to /usr/freeware/lib32/security (PAM dir) # CFLAGS =
+CC=gcc +
###################################################################### # @@ -55,7 +57,7 @@ # gcc -shared pam_radius_auth.o md5.o -lpam -lc -o pam_radius_auth.so # pam_radius_auth.so: pam_radius_auth.o md5.o - ld -Bshareable pam_radius_auth.o md5.o -lpam -o pam_radius_auth.so + ld -G pam_radius_auth.o md5.o -lpam -o pam_radius_auth.so -lsocket
###################################################################### # diff -ruN pam_radius-1.3.16/md5.h pam_radius-1.3.16-solaris10/md5.h --- pam_radius-1.3.16/md5.h 2003-04-29 22:19:16.000000000 +0200 +++ pam_radius-1.3.16-solaris10/md5.h 2006-11-21 18:13:46.000000000 +0100 @@ -15,7 +15,7 @@ #define MD5Transform pra_MD5Transform
#include <sys/types.h> -#define uint32 u_int32_t +#define uint32 uint32_t
struct MD5Context { uint32 buf[4];
---- 8< ----
You may not need Makefile-related part, depending on what compiler / linker you're going to use...
th. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
-- Paul Goodman, (303)497-1235 pgoodman@ucar.edu UCAR/CISL
participants (2)
-
Paul Goodman -
Tomas Hoger