Bug 3145 - samba3 compile error with gcc4 on Solaris
Summary: samba3 compile error with gcc4 on Solaris
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: Build environment (show other bugs)
Version: 3.0.20a
Hardware: All Solaris
: P3 normal
Target Milestone: none
Assignee: Gerald (Jerry) Carter (dead mail address)
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-06 06:59 UTC by Alex Deiter
Modified: 2005-10-11 07:42 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Deiter 2005-10-06 06:59:18 UTC
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

small patch solve this problem:

--- 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"));

Thanks!
Comment 1 Gerald (Jerry) Carter (dead mail address) 2005-10-07 07:42:30 UTC
I'll pull this from the mailing list, but in the future, 
attach pathes rather than placing them inline in the 
comment field.  Thanks.
Comment 2 Gerald (Jerry) Carter (dead mail address) 2005-10-11 07:42:50 UTC
applied for 3.0.20b