[ofa-general] SDP ?

Jim Langston Jim.Langston at Sun.COM
Tue Oct 9 08:13:08 PDT 2007


Hi all,

I'm working on porting SDP to OpenSolaris and am looking at a
compile error that I get. Essentially, I have a conflict of types on
the compile:

bash-3.00$ /opt/SUNWspro/bin/cc -DHAVE_CONFIG_H -I. -I. -I.. -g 
-D_POSIX_PTHREAD_SEMANTICS -DSYSCONFDIR=\"/usr/local/etc\" -g 
-D_POSIX_PTHREAD_SEMANTICS -c port.c  -KPIC -DPIC -o .libs/port.o
"port.c", line 1896: identifier redeclared: getsockname
        current : function(int, pointer to struct sockaddr {unsigned 
short sa_family, array[14] of char sa_data}, pointer to unsigned int) 
returning int
        previous: function(int, pointer to struct sockaddr {unsigned 
short sa_family, array[14] of char sa_data}, pointer to void) returning 
int : "/usr/include/sys/socket.h", line 436


Line 436 in /usr/include/sys/socket.h

extern int getsockname(int, struct sockaddr *_RESTRICT_KYWD, Psocklen_t);


and Psocklen_t

#if defined(_XPG4_2) || defined(_BOOT)
typedef socklen_t       *_RESTRICT_KYWD Psocklen_t;
#else
typedef void    *_RESTRICT_KYWD Psocklen_t;
#endif  /* defined(_XPG4_2) || defined(_BOOT) */


Do I need to change port.c getsockname to type void * ?


Thanks,

Jim



More information about the general mailing list