samba3 compile error with gcc4 on Solaris 9: patch

Дейтер Александр Ва Дейтер Александр Ва
Fri Oct 7 05:44:40 GMT 2005


Alex Deiter wrote:

>>I am trying to compile samba 3.0.20a on Solaris 9 with gcc 4.0.2:
>>% ./configure --with-quotas && make
>>Compiling smbd/fake_file.c
>>Compiling smbd/quotas.c
>>smbd/quotas.c:418: error: static declaration of 'xdr_getquota_args'
>>follows non-static declaration
>>/usr/include/rpcsvc/rquota.h:77: error: previous declaration of
>>'xdr_getquota_args' was here
>>smbd/quotas.c:427: error: static declaration of 'xdr_getquota_rslt'
>>follows non-static declaration
>>/usr/include/rpcsvc/rquota.h:80: error: previous declaration of
>>'xdr_getquota_rslt' was here
>>smbd/quotas.c: In function 'xdr_getquota_rslt':
>>smbd/quotas.c:440: warning: pointer targets in passing argument 2 of
>>'xdr_int' differ in signedness
>>smbd/quotas.c:444: warning: pointer targets in passing argument 2 of
>>'xdr_int' differ in signedness
>>smbd/quotas.c:448: warning: pointer targets in passing argument 2 of
>>'xdr_int' differ in signedness
>>make: *** [smbd/quotas.o] Error 1
> see https://bugzilla.samba.org/show_bug.cgi?id=3145

I propose the attached patch.

Thanks a lot!

-- 
Alex Deiter
-------------- next part --------------
--- source/smbd/quotas.c.orig	Thu Oct  6 17:46:38 2005
+++ source/smbd/quotas.c	Thu Oct  6 17:50:11 2005
@@ -414,7 +414,7 @@
 
 static int quotastat;
 
-static int xdr_getquota_args(XDR *xdrsp, struct getquota_args *args)
+static int my_xdr_getquota_args(XDR *xdrsp, struct getquota_args *args)
 {
 	if (!xdr_string(xdrsp, &args->gqa_pathp, RQ_PATHLEN ))
 		return(0);
@@ -423,7 +423,7 @@
 	return (1);
 }
 
-static int xdr_getquota_rslt(XDR *xdrsp, struct getquota_rslt *gqr)
+static int my_xdr_getquota_rslt(XDR *xdrsp, struct getquota_rslt *gqr)
 {
 	if (!xdr_int(xdrsp, &quotastat)) {
 		DEBUG(6,("nfs_quotas: Status bad or zero\n"));
@@ -493,7 +493,7 @@
 	clnt->cl_auth = authunix_create_default();
 	DEBUG(9,("nfs_quotas: auth_success\n"));
 
-	clnt_stat=clnt_call(clnt, RQUOTAPROC_GETQUOTA, xdr_getquota_args, (caddr_t)&args, xdr_getquota_rslt, (caddr_t)&gqr, timeout);
+	clnt_stat=clnt_call(clnt, RQUOTAPROC_GETQUOTA, my_xdr_getquota_args, (caddr_t)&args, my_xdr_getquota_rslt, (caddr_t)&gqr, timeout);
 
 	if (clnt_stat != RPC_SUCCESS) {
 		DEBUG(9,("nfs_quotas: clnt_call fail\n"));


More information about the samba-technical mailing list