mirror of
https://github.com/moparisthebest/socat
synced 2024-11-11 19:45:03 -05:00
fixed compiler warnings on Mac OS X 64bit
This commit is contained in:
parent
b4b7ffc732
commit
98abed1abd
3
CHANGES
3
CHANGES
@ -75,6 +75,9 @@ porting:
|
||||
Lion 7.1); thanks to Jerry Jacobs to reporting this problem and
|
||||
proposing a solution
|
||||
|
||||
fixed compiler warnings on Mac OS X 64bit. Thanks to Guy Harris for
|
||||
providing the patch.
|
||||
|
||||
####################### V 1.7.1.3:
|
||||
|
||||
security:
|
||||
|
7
filan.c
7
filan.c
@ -1,5 +1,5 @@
|
||||
/* source: filan.c */
|
||||
/* Copyright Gerhard Rieger 2001-2008 */
|
||||
/* Copyright Gerhard Rieger 2001-2011 */
|
||||
/* Published under the GNU General Public License V.2, see file COPYING */
|
||||
|
||||
/* the subroutine filan makes a "FILe descriptor ANalysis". It checks the
|
||||
@ -490,7 +490,10 @@ int cdevan(int fd, FILE *outfile) {
|
||||
return -1;
|
||||
}
|
||||
fprintf(outfile, " \tIFLAGS=%08x OFLAGS=%08x CFLAGS=%08x LFLAGS=%08x",
|
||||
termarg.c_iflag, termarg.c_oflag, termarg.c_cflag, termarg.c_lflag);
|
||||
(unsigned int)termarg.c_iflag,
|
||||
(unsigned int)termarg.c_oflag,
|
||||
(unsigned int)termarg.c_cflag,
|
||||
(unsigned int)termarg.c_lflag);
|
||||
|
||||
/* and the control characters */
|
||||
if (filan_rawoutput) {
|
||||
|
6
hostan.c
6
hostan.c
@ -1,5 +1,5 @@
|
||||
/* source: hostan.c */
|
||||
/* Copyright Gerhard Rieger 2006-2008 */
|
||||
/* Copyright Gerhard Rieger 2006-2011 */
|
||||
/* Published under the GNU General Public License V.2, see file COPYING */
|
||||
|
||||
/* the subroutine hostan makes a "HOST ANalysis". It gathers information
|
||||
@ -59,7 +59,9 @@ static int iffan(FILE *outfile) {
|
||||
|
||||
for (i = 0; i < ic.ifc_len; i += sizeof(struct ifreq)) {
|
||||
struct ifreq *ifp = (struct ifreq *)((caddr_t)ic.ifc_req + i);
|
||||
#if 0 || defined(SIOCGIFINDEX) /* not NetBSD, OpenBSD */
|
||||
struct ifreq ifr;
|
||||
#endif
|
||||
|
||||
#if 0 || defined(SIOCGIFINDEX) /* not NetBSD, OpenBSD */
|
||||
strcpy(ifr.ifr_name, ifp->ifr_name);
|
||||
@ -74,7 +76,7 @@ static int iffan(FILE *outfile) {
|
||||
fprintf(outfile, "%2d: %s\n", ifr.ifr_ifindex, ifp->ifr_name);
|
||||
#endif /* HAVE_STRUCT_IFREQ_IFR_INDEX */
|
||||
#else /* !defined(SIOCGIFINDEX) */
|
||||
fprintf(outfile, "%2d: %s\n", i/sizeof(struct ifreq), ifp->ifr_name);
|
||||
fprintf(outfile, "%2d: %s\n", i/(int)sizeof(struct ifreq), ifp->ifr_name);
|
||||
#endif /* defined(SIOCGIFINDEX) */
|
||||
}
|
||||
Close(s);
|
||||
|
2
xio-ip.c
2
xio-ip.c
@ -454,8 +454,10 @@ int xiolog_ancillary_ip(struct cmsghdr *cmsg, int *num,
|
||||
const char *cmsgtype, *cmsgname = NULL, *cmsgenvn = NULL, *cmsgfmt = NULL;
|
||||
size_t msglen;
|
||||
char scratch1[16]; /* can hold an IPv4 address in ASCII */
|
||||
#if WITH_IP4 && defined(IP_PKTINFO) && HAVE_STRUCT_IN_PKTINFO
|
||||
char scratch2[16];
|
||||
char scratch3[16];
|
||||
#endif
|
||||
|
||||
msglen = cmsg->cmsg_len-((char *)CMSG_DATA(cmsg)-(char *)cmsg);
|
||||
envbuff[0] = '\0';
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* source: xio-socket.c */
|
||||
/* Copyright Gerhard Rieger 2001-2009 */
|
||||
/* Copyright Gerhard Rieger 2001-2011 */
|
||||
/* Published under the GNU General Public License V.2, see file COPYING */
|
||||
|
||||
/* this file contains the source for socket related functions, and the
|
||||
@ -1846,7 +1846,7 @@ xiolog_ancillary_socket(struct cmsghdr *cmsg, int *num,
|
||||
cmsgname = "timestamp";
|
||||
cmsgenvn = "TIMESTAMP";
|
||||
{ time_t t = tv->tv_sec; ctime_r(&t, valbuff); }
|
||||
sprintf(strchr(valbuff, '\0')-1/*del \n*/, ", %06ld usecs", tv->tv_usec);
|
||||
sprintf(strchr(valbuff, '\0')-1/*del \n*/, ", %06ld usecs", (long)tv->tv_usec);
|
||||
break;
|
||||
#endif /* defined(SO_TIMESTAMP) */
|
||||
;
|
||||
|
Loading…
Reference in New Issue
Block a user