diff --git a/Makefile b/Makefile index 1dd34a4..f34e2ef 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ include os.mk include tcsip.mk RE_CFLAGS = -DHAVE_INTTYPES_H -DHAVE_STDBOOL_H \ - -DHAVE_INET6 -DHAVE_GAI_STRERROR -DRELEASE + -DHAVE_INET6 -DHAVE_GAI_STRERROR -DRELEASE -D_XOPEN_SOURCE -D_DEFAULT_SOURCE INCL = -Ideps/include/ -I./src -I./src/util -I../srtp/include/ -I../srtp/crypto/include/ \ -I../opus/include/ -I../speex/include -Ig711 -I./src/rehttp/ diff --git a/src/tcsip/tcmedia.c b/src/tcsip/tcmedia.c index e22a10c..3a8796c 100644 --- a/src/tcsip/tcmedia.c +++ b/src/tcsip/tcmedia.c @@ -1,5 +1,6 @@ #include #include +#include #include "re.h" #include "jitter/ajitter.h" diff --git a/src/tcsip/tcmessage.c b/src/tcsip/tcmessage.c index d5503a0..8f048b7 100644 --- a/src/tcsip/tcmessage.c +++ b/src/tcsip/tcmessage.c @@ -177,7 +177,7 @@ static int msend(struct tcmessages *tcmsg, struct sip_addr *to, struct mbuf *dat tm = gmtime(&tv.tv_sec); strftime(dt, sizeof dt , "Date: %a, %d %b %Y %H:%M:%S", tm); - snprintf(date, sizeof date, "%s.%06u GMT\r\n", dt, tv.tv_usec); + snprintf(date, sizeof date, "%s.%06lu GMT\r\n", dt, tv.tv_usec); err = sip_drequestf(&req, tcmsg->sip, true, "MESSAGE", dlg, 0, NULL, message_sent, message_response, ctx, diff --git a/src/util/ctime.c b/src/util/ctime.c index 0b1e468..dc7d36b 100644 --- a/src/util/ctime.c +++ b/src/util/ctime.c @@ -30,7 +30,7 @@ bool find_date(const struct sip_hdr *hdr, const struct sip_msg *msg, void *arg) } else { ret = strptime(tmp.p, "%a, %d %b %Y %H:%M:%S.", &tm); if(ret) { - sscanf(ret, "%06u GMT", &tv->tv_usec); + sscanf(ret, "%06lu GMT", &tv->tv_usec); } }