Opened 12 years ago
Last modified 9 years ago
#34876 closed defect
[patch] dircproxy 1.0.5 does not compile with clang/llvm 3.0 on OS X Lion — at Initial Version
Reported by: | chris@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | clang haspatch | Cc: | |
Port: | dircproxy |
Description
Attempting to build the dircproxy port results in the following:
make[2]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_irc_dircproxy/dircproxy/work/dircproxy-1.0.5/src' /Developer/usr/bin/clang -DHAVE_CONFIG_H -I. -I. -I.. -DSYSCONFDIR="\"/opt/local/etc\"" -I/opt/local/include -pipe -O2 -arch x86_64 -c irc_server.c irc_server.c:344:69: warning: passing 'int *' to parameter of type 'socklen_t *' (aka 'unsigned int *') converts between pointers to integer types with different sign [-Wpointer-sign]
if (!getsockname(p->server_sock, (struct sockaddr *)&sock_addr, &len)) {
~
/usr/include/sys/socket.h:609:74: note: passing argument to parameter here int getsockname(int, struct sockaddr * restrict, socklen_t * restrict)
irc_server.c:703:52: error: expression is not assignable
s = (l ? l->next : p->squelch_modes) = n;
irc_server.c:744:52: error: expression is not assignable
s = (l ? l->next : p->squelch_modes) = n;
irc_server.c:1089:73: warning: passing 'int *' to parameter of type 'socklen_t *' (aka 'unsigned int *') converts between pointers to integer types with different sign [-Wpointer-sign]
getsockname(p->client_sock, (struct sockaddr *)&vis_addr, &len)) {
~
/usr/include/sys/socket.h:609:74: note: passing argument to parameter here int getsockname(int, struct sockaddr * restrict, socklen_t * restrict)
2 warnings and 2 errors generated. make[2]: * [irc_server.o] Error 1 make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_irc_dircproxy/dircproxy/work/dircproxy-1.0.5/src' make[1]: * [all-recursive] Error 1 make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_irc_dircproxy/dircproxy/work/dircproxy-1.0.5' make: * [all-recursive-am] Error 2 make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_irc_dircproxy/dircproxy/work/dircproxy-1.0.5' Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_irc_dircproxy/dircproxy/work/dircproxy-1.0.5" && /usr/bin/make -w all Exit code: 2
The attached patch fixes all such errors.
Patch files for dircproxy sources and to the Portfile