Buglet compiling smbwrappers in 2.0beta2, Solaris 2.7

David Collier-Brown davecb at Canada.Sun.COM
Wed Dec 2 15:58:42 GMT 1998


In smbwrapper/wrapped.c, the Sun compiler spots a parameter mismatch:
---
/opt/SUNWspro/SC4.2/bin/cc
"smbwrapper/wrapped.c", line 467: identifier redeclared: utimes
        current : function(pointer to char, pointer to void) returning
int
        previous: function(pointer to const char, pointer to const
struct timeval {long tv_sec, long tv_usec}) returning int :
"/usr/include/sys/time.h", line 327
---

The code used to say
 int utimes(char *name,void *tvp)
I changed this to 
 int utimes(const char *name,const struct timeval *tvp)
to match the declaration in /usr/include/sys/time.h:
---
#if defined(__STDC__)
int getitimer(int, struct itimerval *);
int utimes(const char *, const struct timeval *);
---

I don't know if gcc will notice this or not: I've not got gcc on
my system at work...

I only discovered this when I configured with the non-default 
smbwrappers option. 

A side question: why is it non-default?

--dave c-b
-- 
David Collier-Brown,  | Always do right. This will gratify some people
185 Ellerslie Ave.,   | and astonish the rest.        -- Mark Twain
Willowdale, Ontario   | http://java.science.yorku.ca/~davecb
Work: (905) 477-0437, Home: (416) 223-8968, Email: davecb at canada.sun.com


More information about the samba-technical mailing list