Control: tags -1 +pending Hi! I've prepared a NMU fixing this bug, it's in delayed/7. Debdiff attached, if you dislike it for any reason, please say so.
-- An imaginary friend squared is a real enemy.
diff -Nru crtmpserver-1.0~dfsg/debian/changelog crtmpserver-1.0~dfsg/debian/changelog --- crtmpserver-1.0~dfsg/debian/changelog 2015-10-25 13:14:35.000000000 +0100 +++ crtmpserver-1.0~dfsg/debian/changelog 2016-07-30 04:29:24.000000000 +0200 @@ -1,3 +1,11 @@ +crtmpserver (1.0~dfsg-5.2) unstable; urgency=medium + + * Non-maintainer upload. + * Fix FTBFS with gcc-6 (Closes: #811622). + * Remove Andres Mejia from Uploaders, per the MIA team (Closes: #743519). + + -- Adam Borowski <kilob...@angband.pl> Sat, 30 Jul 2016 04:26:19 +0200 + crtmpserver (1.0~dfsg-5.1) unstable; urgency=medium * Non-maintainer upload. diff -Nru crtmpserver-1.0~dfsg/debian/control crtmpserver-1.0~dfsg/debian/control --- crtmpserver-1.0~dfsg/debian/control 2015-10-25 13:13:20.000000000 +0100 +++ crtmpserver-1.0~dfsg/debian/control 2016-07-30 04:26:13.000000000 +0200 @@ -5,7 +5,6 @@ Uploaders: Alessio Treglia <ales...@debian.org>, Andriy Beregovenko <j...@jet.kiev.ua>, - Andres Mejia <ame...@debian.org> Build-Depends: cmake, debhelper (>= 9), diff -Nru crtmpserver-1.0~dfsg/debian/patches/22_fix_ftbfs_gcc-6.diff crtmpserver-1.0~dfsg/debian/patches/22_fix_ftbfs_gcc-6.diff --- crtmpserver-1.0~dfsg/debian/patches/22_fix_ftbfs_gcc-6.diff 1970-01-01 01:00:00.000000000 +0100 +++ crtmpserver-1.0~dfsg/debian/patches/22_fix_ftbfs_gcc-6.diff 2016-07-30 04:25:36.000000000 +0200 @@ -0,0 +1,1928 @@ +Description: fix build failure with gcc-6 + All of many errors are of only two types: + . + * letters after string literals, sometimes fatal: "foo"name"bar", sometimes + merely a warning: "foo"PRIx64 -- I've fixed either + * "return false;" in a function returning a pointer +Author: Adam Borowski <kilob...@angband.pl> +Bug-Debian: https://bugs.debian.org/811622 + +--- crtmpserver-1.0~dfsg.orig/applications/applestreamingclient/src/playlist.cpp ++++ crtmpserver-1.0~dfsg/applications/applestreamingclient/src/playlist.cpp +@@ -223,7 +223,7 @@ uint32_t Playlist::GetIndex(uint32_t &se + //2. We don't have it, and is a 0 value, that means it was never initialized + if (sequence == 0) { + FINEST("sequence is 0"); +- FINEST("_itemMediaSequences.size(): %"PRIz"u", _itemMediaSequences.size()); ++ FINEST("_itemMediaSequences.size(): %" PRIz"u", _itemMediaSequences.size()); + if (_itemMediaSequences.size() != 0) { + //3. We have stuff. Init and return + FINEST("Return the first entry"); +--- crtmpserver-1.0~dfsg.orig/applications/applestreamingclient/src/protocols/key/inboundkeyprotocol.cpp ++++ crtmpserver-1.0~dfsg/applications/applestreamingclient/src/protocols/key/inboundkeyprotocol.cpp +@@ -74,7 +74,7 @@ bool InboundKeyProtocol::SignalInputData + //6. Unbase64 the encrypted key + string encryptedKey = unb64(temp); + if (encryptedKey.size() != 16) { +- FATAL("Invalid key length: %"PRIz"u", encryptedKey.size()); ++ FATAL("Invalid key length: %" PRIz"u", encryptedKey.size()); + return false; + } + +--- crtmpserver-1.0~dfsg.orig/common/src/platform/android/androidplatform.cpp ++++ crtmpserver-1.0~dfsg/common/src/platform/android/androidplatform.cpp +@@ -159,7 +159,7 @@ bool setFdTTL(int32_t fd, uint8_t ttl) { + int temp = ttl; + if (setsockopt(fd, IPPROTO_IP, IP_TTL, &temp, sizeof (temp)) != 0) { + int err = errno; +- WARN("Unable to set IP_TTL: %"PRIu8"; error was %"PRId32" %s", ttl, err, strerror(err)); ++ WARN("Unable to set IP_TTL: %" PRIu8"; error was %" PRId32" %s", ttl, err, strerror(err)); + } + return true; + } +@@ -168,7 +168,7 @@ bool setFdMulticastTTL(int32_t fd, uint8 + int temp = ttl; + if (setsockopt(fd, IPPROTO_IP, IP_MULTICAST_TTL, &temp, sizeof (temp)) != 0) { + int err = errno; +- WARN("Unable to set IP_MULTICAST_TTL: %"PRIu8"; error was %"PRId32" %s", ttl, err, strerror(err)); ++ WARN("Unable to set IP_MULTICAST_TTL: %" PRIu8"; error was %" PRId32" %s", ttl, err, strerror(err)); + } + return true; + } +@@ -177,7 +177,7 @@ bool setFdTOS(int32_t fd, uint8_t tos) { + int temp = tos; + if (setsockopt(fd, IPPROTO_IP, IP_TOS, &temp, sizeof (temp)) != 0) { + int err = errno; +- WARN("Unable to set IP_TOS: %"PRIu8"; error was %"PRId32" %s", tos, err, strerror(err)); ++ WARN("Unable to set IP_TOS: %" PRIu8"; error was %" PRId32" %s", tos, err, strerror(err)); + } + return true; + } +--- crtmpserver-1.0~dfsg.orig/common/src/platform/dfreebsd/dfreebsdplatform.cpp ++++ crtmpserver-1.0~dfsg/common/src/platform/dfreebsd/dfreebsdplatform.cpp +@@ -160,7 +160,7 @@ bool setFdTTL(int32_t fd, uint8_t ttl) { + int temp = ttl; + if (setsockopt(fd, IPPROTO_IP, IP_TTL, &temp, sizeof (temp)) != 0) { + int err = errno; +- WARN("Unable to set IP_TTL: %"PRIu8"; error was %"PRId32" %s", ttl, err, strerror(err)); ++ WARN("Unable to set IP_TTL: %" PRIu8"; error was %" PRId32" %s", ttl, err, strerror(err)); + } + return true; + } +@@ -169,7 +169,7 @@ bool setFdMulticastTTL(int32_t fd, uint8 + int temp = ttl; + if (setsockopt(fd, IPPROTO_IP, IP_MULTICAST_TTL, &temp, sizeof (temp)) != 0) { + int err = errno; +- WARN("Unable to set IP_MULTICAST_TTL: %"PRIu8"; error was %"PRId32" %s", ttl, err, strerror(err)); ++ WARN("Unable to set IP_MULTICAST_TTL: %" PRIu8"; error was %" PRId32" %s", ttl, err, strerror(err)); + } + return true; + } +@@ -178,7 +178,7 @@ bool setFdTOS(int32_t fd, uint8_t tos) { + int temp = tos; + if (setsockopt(fd, IPPROTO_IP, IP_TOS, &temp, sizeof (temp)) != 0) { + int err = errno; +- WARN("Unable to set IP_TOS: %"PRIu8"; error was %"PRId32" %s", tos, err, strerror(err)); ++ WARN("Unable to set IP_TOS: %" PRIu8"; error was %" PRId32" %s", tos, err, strerror(err)); + } + return true; + } +--- crtmpserver-1.0~dfsg.orig/common/src/platform/freebsd/freebsdplatform.cpp ++++ crtmpserver-1.0~dfsg/common/src/platform/freebsd/freebsdplatform.cpp +@@ -164,7 +164,7 @@ bool setFdTTL(int32_t fd, uint8_t ttl) { + int temp = ttl; + if (setsockopt(fd, IPPROTO_IP, IP_TTL, &temp, sizeof (temp)) != 0) { + int err = errno; +- WARN("Unable to set IP_TTL: %"PRIu8"; error was %"PRId32" %s", ttl, err, strerror(err)); ++ WARN("Unable to set IP_TTL: %" PRIu8"; error was %" PRId32" %s", ttl, err, strerror(err)); + } + return true; + } +@@ -173,7 +173,7 @@ bool setFdMulticastTTL(int32_t fd, uint8 + int temp = ttl; + if (setsockopt(fd, IPPROTO_IP, IP_MULTICAST_TTL, &temp, sizeof (temp)) != 0) { + int err = errno; +- WARN("Unable to set IP_MULTICAST_TTL: %"PRIu8"; error was %"PRId32" %s", ttl, err, strerror(err)); ++ WARN("Unable to set IP_MULTICAST_TTL: %" PRIu8"; error was %" PRId32" %s", ttl, err, strerror(err)); + } + return true; + } +@@ -182,7 +182,7 @@ bool setFdTOS(int32_t fd, uint8_t tos) { + int temp = tos; + if (setsockopt(fd, IPPROTO_IP, IP_TOS, &temp, sizeof (temp)) != 0) { + int err = errno; +- WARN("Unable to set IP_TOS: %"PRIu8"; error was %"PRId32" %s", tos, err, strerror(err)); ++ WARN("Unable to set IP_TOS: %" PRIu8"; error was %" PRId32" %s", tos, err, strerror(err)); + } + return true; + } +--- crtmpserver-1.0~dfsg.orig/common/src/platform/linux/linuxplatform.cpp ++++ crtmpserver-1.0~dfsg/common/src/platform/linux/linuxplatform.cpp +@@ -164,7 +164,7 @@ bool setFdTTL(int32_t fd, uint8_t ttl) { + int temp = ttl; + if (setsockopt(fd, IPPROTO_IP, IP_TTL, &temp, sizeof (temp)) != 0) { + int err = errno; +- WARN("Unable to set IP_TTL: %"PRIu8"; error was %"PRId32" %s", ttl, err, strerror(err)); ++ WARN("Unable to set IP_TTL: %" PRIu8"; error was %" PRId32" %s", ttl, err, strerror(err)); + } + return true; + } +@@ -173,7 +173,7 @@ bool setFdMulticastTTL(int32_t fd, uint8 + int temp = ttl; + if (setsockopt(fd, IPPROTO_IP, IP_MULTICAST_TTL, &temp, sizeof (temp)) != 0) { + int err = errno; +- WARN("Unable to set IP_MULTICAST_TTL: %"PRIu8"; error was %"PRId32" %s", ttl, err, strerror(err)); ++ WARN("Unable to set IP_MULTICAST_TTL: %" PRIu8"; error was %" PRId32" %s", ttl, err, strerror(err)); + } + return true; + } +@@ -182,7 +182,7 @@ bool setFdTOS(int32_t fd, uint8_t tos) { + int temp = tos; + if (setsockopt(fd, IPPROTO_IP, IP_TOS, &temp, sizeof (temp)) != 0) { + int err = errno; +- WARN("Unable to set IP_TOS: %"PRIu8"; error was %"PRId32" %s", tos, err, strerror(err)); ++ WARN("Unable to set IP_TOS: %" PRIu8"; error was %" PRId32" %s", tos, err, strerror(err)); + } + return true; + } +--- crtmpserver-1.0~dfsg.orig/common/src/platform/openbsd/openbsdplatform.cpp ++++ crtmpserver-1.0~dfsg/common/src/platform/openbsd/openbsdplatform.cpp +@@ -166,7 +166,7 @@ bool setFdTTL(int32_t fd, uint8_t ttl) { + int temp = ttl; + if (setsockopt(fd, IPPROTO_IP, IP_TTL, &temp, sizeof (temp)) != 0) { + int err = errno; +- WARN("Unable to set IP_TTL: %"PRIu8"; error was %"PRId32" %s", ttl, err, strerror(err)); ++ WARN("Unable to set IP_TTL: %" PRIu8"; error was %" PRId32" %s", ttl, err, strerror(err)); + } + return true; + } +@@ -175,7 +175,7 @@ bool setFdMulticastTTL(int32_t fd, uint8 + int temp = ttl; + if (setsockopt(fd, IPPROTO_IP, IP_MULTICAST_TTL, &temp, sizeof (temp)) != 0) { + int err = errno; +- WARN("Unable to set IP_MULTICAST_TTL: %"PRIu8"; error was %"PRId32" %s", ttl, err, strerror(err)); ++ WARN("Unable to set IP_MULTICAST_TTL: %" PRIu8"; error was %" PRId32" %s", ttl, err, strerror(err)); + } + return true; + } +@@ -184,7 +184,7 @@ bool setFdTOS(int32_t fd, uint8_t tos) { + int temp = tos; + if (setsockopt(fd, IPPROTO_IP, IP_TOS, &temp, sizeof (temp)) != 0) { + int err = errno; +- WARN("Unable to set IP_TOS: %"PRIu8"; error was %"PRId32" %s", tos, err, strerror(err)); ++ WARN("Unable to set IP_TOS: %" PRIu8"; error was %" PRId32" %s", tos, err, strerror(err)); + } + return true; + } +--- crtmpserver-1.0~dfsg.orig/common/src/platform/osx/osxplatform.cpp ++++ crtmpserver-1.0~dfsg/common/src/platform/osx/osxplatform.cpp +@@ -165,7 +165,7 @@ bool setFdTTL(int32_t fd, uint8_t ttl) { + int temp = ttl; + if (setsockopt(fd, IPPROTO_IP, IP_TTL, &temp, sizeof (temp)) != 0) { + int err = errno; +- WARN("Unable to set IP_TTL: %"PRIu8"; error was %"PRId32" %s", ttl, err, strerror(err)); ++ WARN("Unable to set IP_TTL: %" PRIu8"; error was %" PRId32" %s", ttl, err, strerror(err)); + } + return true; + } +@@ -174,7 +174,7 @@ bool setFdMulticastTTL(int32_t fd, uint8 + int temp = ttl; + if (setsockopt(fd, IPPROTO_IP, IP_MULTICAST_TTL, &temp, sizeof (temp)) != 0) { + int err = errno; +- WARN("Unable to set IP_MULTICAST_TTL: %"PRIu8"; error was %"PRId32" %s", ttl, err, strerror(err)); ++ WARN("Unable to set IP_MULTICAST_TTL: %" PRIu8"; error was %" PRId32" %s", ttl, err, strerror(err)); + } + return true; + } +@@ -183,7 +183,7 @@ bool setFdTOS(int32_t fd, uint8_t tos) { + int temp = tos; + if (setsockopt(fd, IPPROTO_IP, IP_TOS, &temp, sizeof (temp)) != 0) { + int err = errno; +- WARN("Unable to set IP_TOS: %"PRIu8"; error was %"PRId32" %s", tos, err, strerror(err)); ++ WARN("Unable to set IP_TOS: %" PRIu8"; error was %" PRId32" %s", tos, err, strerror(err)); + } + return true; + } +--- crtmpserver-1.0~dfsg.orig/common/src/platform/solaris/solarisplatform.cpp ++++ crtmpserver-1.0~dfsg/common/src/platform/solaris/solarisplatform.cpp +@@ -194,7 +194,7 @@ bool setFdTTL(int32_t fd, uint8_t ttl) { + int temp = ttl; + if (setsockopt(fd, IPPROTO_IP, IP_TTL, &temp, sizeof (temp)) != 0) { + int err = errno; +- WARN("Unable to set IP_TTL: %"PRIu8"; error was %"PRId32" %s", ttl, err, strerror(err)); ++ WARN("Unable to set IP_TTL: %" PRIu8"; error was %" PRId32" %s", ttl, err, strerror(err)); + } + return true; + } +@@ -203,7 +203,7 @@ bool setFdMulticastTTL(int32_t fd, uint8 + int temp = ttl; + if (setsockopt(fd, IPPROTO_IP, IP_MULTICAST_TTL, &temp, sizeof (temp)) != 0) { + int err = errno; +- WARN("Unable to set IP_MULTICAST_TTL: %"PRIu8"; error was %"PRId32" %s", ttl, err, strerror(err)); ++ WARN("Unable to set IP_MULTICAST_TTL: %" PRIu8"; error was %" PRId32" %s", ttl, err, strerror(err)); + } + return true; + } +@@ -212,7 +212,7 @@ bool setFdTOS(int32_t fd, uint8_t tos) { + int temp = tos; + if (setsockopt(fd, IPPROTO_IP, IP_TOS, &temp, sizeof (temp)) != 0) { + int err = errno; +- WARN("Unable to set IP_TOS: %"PRIu8"; error was %"PRId32" %s", tos, err, strerror(err)); ++ WARN("Unable to set IP_TOS: %" PRIu8"; error was %" PRId32" %s", tos, err, strerror(err)); + } + return true; + } +--- crtmpserver-1.0~dfsg.orig/common/src/utils/logging/fileloglocation.cpp ++++ crtmpserver-1.0~dfsg/common/src/utils/logging/fileloglocation.cpp +@@ -82,7 +82,7 @@ void FileLogLocation::Log(int32_t level, + if (_fileIsClosed) + return; + } +- string logEntry = format("%"PRIu64":%d:%s:%u:%s:%s", ++ string logEntry = format("%" PRIu64":%d:%s:%u:%s:%s", + (uint64_t) time(NULL), level, STR(fileName), lineNumber, STR(functionName), + STR(message)); + if (_singleLine) { +@@ -115,7 +115,7 @@ bool FileLogLocation::OpenFile() { + double ts; + GETCLOCKS(ts); + ts = (ts / CLOCKS_PER_SECOND)*1000; +- string temp = format("%s.%"PRIu64".%"PRIu64, STR(_fileName), (uint64_t) getpid(), (uint64_t) ts); ++ string temp = format("%s.%" PRIu64".%" PRIu64, STR(_fileName), (uint64_t) getpid(), (uint64_t) ts); + ios_base::openmode openMode = ios_base::out | ios_base::binary | ios_base::trunc; + _fileStream.open(STR(temp), openMode); + if (_fileStream.fail()) { +--- crtmpserver-1.0~dfsg.orig/common/src/utils/logging/syslogloglocation.cpp ++++ crtmpserver-1.0~dfsg/common/src/utils/logging/syslogloglocation.cpp +@@ -84,7 +84,7 @@ void SyslogLogLocation::Log(int32_t leve + int priority = (MAP_HAS1(_priorities, level) ? _priorities[level] : LOG_DEBUG) | LOG_USER; + + if (_appendSourceFileLine) { +- syslog(priority, "%s %s:%"PRIu32":%s %s", ++ syslog(priority, "%s %s:%" PRIu32":%s %s", + STR(le["loggerName"]), + STR(fileName), + lineNumber, +--- crtmpserver-1.0~dfsg.orig/common/src/utils/misc/file.cpp ++++ crtmpserver-1.0~dfsg/common/src/utils/misc/file.cpp +@@ -148,7 +148,7 @@ bool File::SeekAhead(int64_t count) { + + _file.seekg(count, ios_base::cur); + if (_file.fail()) { +- FATAL("Unable to seek ahead %"PRId64" bytes", count); ++ FATAL("Unable to seek ahead %" PRId64" bytes", count); + return false; + } + return true; +@@ -167,7 +167,7 @@ bool File::SeekBehind(int64_t count) { + + _file.seekg((-1) * count, ios_base::cur); + if (_file.fail()) { +- FATAL("Unable to seek behind %"PRId64" bytes", count); ++ FATAL("Unable to seek behind %" PRId64" bytes", count); + return false; + } + return true; +@@ -181,7 +181,7 @@ bool File::SeekTo(uint64_t position) { + + _file.seekg(position, ios_base::beg); + if (_file.fail()) { +- FATAL("Unable to seek to position %"PRIu64, position); ++ FATAL("Unable to seek to position %" PRIu64, position); + return false; + } + +@@ -261,7 +261,7 @@ bool File::ReadUI64(uint64_t *pValue, bo + bool File::ReadBuffer(uint8_t *pBuffer, uint64_t count) { + _file.read((char *) pBuffer, count); + if (_file.fail()) { +- FATAL("Unable to read %"PRIu64" bytes from the file. Cursor: %"PRIu64" (0x%"PRIx64"); %d (%s)", ++ FATAL("Unable to read %" PRIu64" bytes from the file. Cursor: %" PRIu64" (0x%" PRIx64"); %d (%s)", + count, Cursor(), Cursor(), errno, strerror(errno)); + return false; + } +@@ -434,7 +434,7 @@ bool File::WriteString(string &value) { + bool File::WriteBuffer(const uint8_t *pBuffer, uint64_t count) { + _file.write((char *) pBuffer, count); + if (_file.fail()) { +- FATAL("Unable to write %"PRIu64" bytes to file", count); ++ FATAL("Unable to write %" PRIu64" bytes to file", count); + return false; + } + return true; +--- crtmpserver-1.0~dfsg.orig/common/src/utils/misc/mmapfile.cpp ++++ crtmpserver-1.0~dfsg/common/src/utils/misc/mmapfile.cpp +@@ -71,7 +71,7 @@ bool MmapPointer::Allocate(int fd, uint6 + Free(); + + if (size > windowSize) { +- FATAL("size is greater than window size: %"PRIu64" > %u", size, windowSize); ++ FATAL("size is greater than window size: %" PRIu64" > %u", size, windowSize); + return false; + } + +@@ -82,12 +82,12 @@ bool MmapPointer::Allocate(int fd, uint6 + //2. Compute the new size + _size = windowSize; + while (_cursor + _size < cursor + size) { +- LOG_MMAP("We need to go a little bit further; Wanted: %"PRIu64"; got: %"PRIu64, ++ LOG_MMAP("We need to go a little bit further; Wanted: %" PRIu64"; got: %" PRIu64, + cursor + size, _cursor + _size); + _size += MmapFile::_pageSize; + } + +- LOG_MMAP("Reading %"PRIu64" bytes from disk", _size); ++ LOG_MMAP("Reading %" PRIu64" bytes from disk", _size); + _pData = (uint8_t *) mmap(NULL, + _size, + PROT_READ, +@@ -148,7 +148,7 @@ bool MmapPointer::HasRange(uint64_t curs + MmapPointer::operator string() { + if (_size == 0) + return "[N - N](0)"; +- return format("[%"PRIu64" - %"PRIu64"](%u)", _cursor, _cursor + _size - 1, _size); ++ return format("[%" PRIu64" - %" PRIu64"](%u)", _cursor, _cursor + _size - 1, _size); + } + + bool MmapFile::Initialize(string path, uint32_t windowSize, bool exclusive) { +@@ -256,7 +256,7 @@ bool MmapFile::SeekTo(uint64_t position) + return false; + } + if (position > _size) { +- FATAL("Invalid position: %"PRIu64". Must be at most: %"PRIu64, position, _size - 1); ++ FATAL("Invalid position: %" PRIu64". Must be at most: %" PRIu64, position, _size - 1); + _failed = true; + return false; + } +@@ -403,22 +403,22 @@ bool MmapFile::PeekUI64(uint64_t *pValue + bool MmapFile::PeekBuffer(uint8_t *pDestBuffer, uint64_t count) { + //1. Sanity checks + if (_failed) { +- DEBUG("_cursor: %"PRIu64"; count: %"PRIu64"; %s", _cursor, count, STR(_path)); ++ DEBUG("_cursor: %" PRIu64"; count: %" PRIu64"; %s", _cursor, count, STR(_path)); + FATAL("This mmap file is in inconsistent state"); + return false; + } + + if (_windowSize < count) { +- DEBUG("_cursor: %"PRIu64"; count: %"PRIu64"; %s", _cursor, count, STR(_path)); +- FATAL("Invalid window size: _windowSize < count %u < %"PRIu64, ++ DEBUG("_cursor: %" PRIu64"; count: %" PRIu64"; %s", _cursor, count, STR(_path)); ++ FATAL("Invalid window size: _windowSize < count %u < %" PRIu64, + _windowSize, count); + _failed = true; + return false; + } + + if (_cursor + count > _size) { +- DEBUG("_cursor: %"PRIu64"; count: %"PRIu64"; %s", _cursor, count, STR(_path)); +- FATAL("EOF will be reached: cursor: %"PRIu64"; count: %"PRIu64"; size: %"PRIu64, ++ DEBUG("_cursor: %" PRIu64"; count: %" PRIu64"; %s", _cursor, count, STR(_path)); ++ FATAL("EOF will be reached: cursor: %" PRIu64"; count: %" PRIu64"; size: %" PRIu64, + _cursor, count, _size); + _failed = true; + return false; +@@ -447,7 +447,7 @@ bool MmapFile::PeekBuffer(uint8_t *pDest + + //3. Do the read + if (pPointer->Copy(pDestBuffer, _cursor, 0, count) != count) { +- FATAL("Unable to copy %"PRIu64" bytes", count); ++ FATAL("Unable to copy %" PRIu64" bytes", count); + _failed = true; + return false; + } +--- crtmpserver-1.0~dfsg.orig/common/src/utils/misc/uri.cpp ++++ crtmpserver-1.0~dfsg/common/src/utils/misc/uri.cpp +@@ -94,7 +94,7 @@ bool parseURI(string stringUri, URI &uri + // FATAL("Scheme `%s` not supported", STR(scheme)); + // return false; + // } +- LOG_URI("scheme: %s; default port: %"PRIu16, STR(scheme), port); ++ LOG_URI("scheme: %s; default port: %" PRIu16, STR(scheme), port); + + //3. get the authentication portion. the search starts from + //where the scheme detection left and up to the first / character +@@ -154,12 +154,12 @@ bool parseURI(string stringUri, URI &uri + portString = hostPort.substr(pos + 1); + portSpecified = true; + port = (uint16_t) atoi(STR(portString)); +- if (format("%"PRIu16, port) != portString) { ++ if (format("%" PRIu16, port) != portString) { + FATAL("Invalid port number specified: `%s`", STR(portString)); + return false; + } + } +- LOG_URI("host: %s; port: %"PRIu16"; portSpecified: %d", STR(host), port, portSpecified); ++ LOG_URI("host: %s; port: %" PRIu16"; portSpecified: %d", STR(host), port, portSpecified); + + //5. fullDocumentPathWithParameters + fullDocumentPath = "/"; +--- crtmpserver-1.0~dfsg.orig/common/src/utils/misc/variant.cpp ++++ crtmpserver-1.0~dfsg/common/src/utils/misc/variant.cpp +@@ -271,7 +271,7 @@ string Variant::ToString(string name, ui + } + case V_INT64: + { +- result += format("%s<INT64 name=\"%s\">%"PRId64"</INT64>", ++ result += format("%s<INT64 name=\"%s\">%" PRId64"</INT64>", + STR(strIndent), STR(name), _value.i64); + break; + } +@@ -295,7 +295,7 @@ string Variant::ToString(string name, ui + } + case V_UINT64: + { +- result += format("%s<UINT64 name=\"%s\">%"PRIu64"</UINT64>", ++ result += format("%s<UINT64 name=\"%s\">%" PRIu64"</UINT64>", + STR(strIndent), STR(name), _value.ui64); + break; + } +@@ -331,7 +331,7 @@ string Variant::ToString(string name, ui + } + case V_BYTEARRAY: + { +- result += format("%s<BYTEARRAY name=\"%s\">%"PRIz"u bytes</BYTEARRAY>", ++ result += format("%s<BYTEARRAY name=\"%s\">%" PRIz"u bytes</BYTEARRAY>", + STR(strIndent), STR(name), _value.s->length()); + break; + } +@@ -618,7 +618,7 @@ Variant::operator string() { + } + case V_INT64: + { +- return format("%"PRId64, this->operator int64_t()); ++ return format("%" PRId64, this->operator int64_t()); + } + case V_UINT8: + case V_UINT16: +@@ -628,7 +628,7 @@ Variant::operator string() { + } + case V_UINT64: + { +- return format("%"PRIu64, this->operator uint64_t()); ++ return format("%" PRIu64, this->operator uint64_t()); + } + case V_DOUBLE: + { +@@ -1590,7 +1590,7 @@ bool Variant::SerializeToJSON(string &re + case V_INT64: + { + int64_t value = (int64_t) (*this); +- result += format("%"PRId64, value); ++ result += format("%" PRId64, value); + break; + } + case V_UINT8: +@@ -1599,7 +1599,7 @@ bool Variant::SerializeToJSON(string &re + case V_UINT64: + { + uint64_t value = (uint64_t) (*this); +- result += format("%"PRIu64, value); ++ result += format("%" PRIu64, value); + break; + } + case V_DOUBLE: +@@ -1719,7 +1719,7 @@ TiXmlElement *Variant::SerializeToXmlEle + case V_INT64: + { + pResult = new TiXmlElement("INT64"); +- pResult->LinkEndChild(new TiXmlText(format("%"PRId64, _value.i64))); ++ pResult->LinkEndChild(new TiXmlText(format("%" PRId64, _value.i64))); + break; + } + case V_UINT8: +@@ -1743,7 +1743,7 @@ TiXmlElement *Variant::SerializeToXmlEle + case V_UINT64: + { + pResult = new TiXmlElement("UINT64"); +- pResult->LinkEndChild(new TiXmlText(format("%"PRIu64, _value.ui64))); ++ pResult->LinkEndChild(new TiXmlText(format("%" PRIu64, _value.ui64))); + break; + } + case V_DOUBLE: +@@ -2034,56 +2034,56 @@ bool Variant::DeserializeFromXml(TiXmlEl + variant.Reset(true); + return true; + } else if (nodeName == "int8") { +- if (sscanf(STR(text), "%"PRId64, &val.i64) != 1) { ++ if (sscanf(STR(text), "%" PRId64, &val.i64) != 1) { + FATAL("Invalid number"); + return false; + } + variant = (int8_t) val.i64; + return true; + } else if (nodeName == "int16") { +- if (sscanf(STR(text), "%"PRId64, &val.i64) != 1) { ++ if (sscanf(STR(text), "%" PRId64, &val.i64) != 1) { + FATAL("Invalid number"); + return false; + } + variant = (int16_t) val.i64; + return true; + } else if (nodeName == "int32") { +- if (sscanf(STR(text), "%"PRId64, &val.i64) != 1) { ++ if (sscanf(STR(text), "%" PRId64, &val.i64) != 1) { + FATAL("Invalid number"); + return false; + } + variant = (int32_t) val.i64; + return true; + } else if (nodeName == "int64") { +- if (sscanf(STR(text), "%"PRId64, &val.i64) != 1) { ++ if (sscanf(STR(text), "%" PRId64, &val.i64) != 1) { + FATAL("Invalid number"); + return false; + } + variant = (int64_t) val.i64; + return true; + } else if (nodeName == "uint8") { +- if (sscanf(STR(text), "%"PRIu64, &val.ui64) != 1) { ++ if (sscanf(STR(text), "%" PRIu64, &val.ui64) != 1) { + FATAL("Invalid number"); + return false; + } + variant = (uint8_t) val.ui64; + return true; + } else if (nodeName == "uint16") { +- if (sscanf(STR(text), "%"PRIu64, &val.ui64) != 1) { ++ if (sscanf(STR(text), "%" PRIu64, &val.ui64) != 1) { + FATAL("Invalid number"); + return false; + } + variant = (uint16_t) val.ui64; + return true; + } else if (nodeName == "uint32") { +- if (sscanf(STR(text), "%"PRIu64, &val.ui64) != 1) { ++ if (sscanf(STR(text), "%" PRIu64, &val.ui64) != 1) { + FATAL("Invalid number"); + return false; + } + variant = (uint32_t) val.ui64; + return true; + } else if (nodeName == "uint64") { +- if (sscanf(STR(text), "%"PRIu64, &val.ui64) != 1) { ++ if (sscanf(STR(text), "%" PRIu64, &val.ui64) != 1) { + FATAL("Invalid number"); + return false; + } +--- crtmpserver-1.0~dfsg.orig/crtmpserver/src/crtmpserver.cpp ++++ crtmpserver-1.0~dfsg/crtmpserver/src/crtmpserver.cpp +@@ -385,7 +385,7 @@ void WritePidFile(pid_t pid) { + return; + } + +- string content = format("%"PRIz"d", pid); ++ string content = format("%" PRIz"d", pid); + if (!f.WriteString(content)) { + WARN("Unable to write PID to file %s", STR(pidFile)); + return; +--- crtmpserver-1.0~dfsg.orig/thelib/include/mediaformats/mediaframe.h ++++ crtmpserver-1.0~dfsg/thelib/include/mediaformats/mediaframe.h +@@ -37,7 +37,7 @@ typedef struct _MediaFrame { + int32_t compositionOffset; + + operator string() { +- return format("s: %"PRIx64"; l: %"PRIx64"; t: %hhu; dt: %.2f; kf: %hhu; at: %.2f; bh: %hhu", ++ return format("s: %" PRIx64"; l: %" PRIx64"; t: %hhu; dt: %.2f; kf: %hhu; at: %.2f; bh: %hhu", + start, length, type, deltaTime, isKeyFrame, absoluteTime, isBinaryHeader); + }; + } MediaFrame; +--- crtmpserver-1.0~dfsg.orig/thelib/include/protocols/ts/tspacketpmt.h ++++ crtmpserver-1.0~dfsg/thelib/include/protocols/ts/tspacketpmt.h +@@ -56,7 +56,7 @@ typedef struct _TSStreamInfo { + } + + string toString(int32_t indent) { +- string result = format("%sstreamType: %hhx; elementaryPID: %hu; esInfoLength: %hu; descriptors count: %"PRIz"u\n", ++ string result = format("%sstreamType: %hhx; elementaryPID: %hu; esInfoLength: %hu; descriptors count: %" PRIz"u\n", + STR(string(indent, '\t')), + streamType, elementaryPID, esInfoLength, esDescriptors.size()); + for (uint32_t i = 0; i < esDescriptors.size(); i++) { +--- crtmpserver-1.0~dfsg.orig/thelib/src/application/baseclientapplication.cpp ++++ crtmpserver-1.0~dfsg/thelib/src/application/baseclientapplication.cpp +@@ -217,7 +217,7 @@ void BaseClientApplication::UnRegisterPr + } + + void BaseClientApplication::SignalStreamRegistered(BaseStream *pStream) { +- INFO("Stream %s(%"PRIu32") with name `%s` registered to application `%s` from protocol %s(%"PRIu32")", ++ INFO("Stream %s(%" PRIu32") with name `%s` registered to application `%s` from protocol %s(%" PRIu32")", + STR(tagToString(pStream->GetType())), + pStream->GetUniqueId(), + STR(pStream->GetName()), +@@ -228,7 +228,7 @@ void BaseClientApplication::SignalStream + } + + void BaseClientApplication::SignalStreamUnRegistered(BaseStream *pStream) { +- INFO("Stream %s(%"PRIu32") with name `%s` unregistered from application `%s` from protocol %s(%"PRIu32")", ++ INFO("Stream %s(%" PRIu32") with name `%s` unregistered from application `%s` from protocol %s(%" PRIu32")", + STR(tagToString(pStream->GetType())), + pStream->GetUniqueId(), + STR(pStream->GetName()), +--- crtmpserver-1.0~dfsg.orig/thelib/src/configuration/configfile.cpp ++++ crtmpserver-1.0~dfsg/thelib/src/configuration/configfile.cpp +@@ -555,7 +555,7 @@ bool ConfigFile::NormalizeApplicationAcc + if (node.HasKeyChain(_V_NUMERIC, false, 1, CONF_PORT)) + port = (int32_t) node.GetValue(CONF_PORT, false); + if (port <= 0 || port >= 65536) { +- FATAL("Invalid port: %"PRId32, port); ++ FATAL("Invalid port: %" PRId32, port); + return false; + } + node[CONF_PORT] = (uint16_t) port; +--- crtmpserver-1.0~dfsg.orig/thelib/src/mediaformats/basemediadocument.cpp ++++ crtmpserver-1.0~dfsg/thelib/src/mediaformats/basemediadocument.cpp +@@ -36,8 +36,8 @@ bool BaseMediaDocument::Process() { + + //1. Compute the names + _mediaFilePath = (string) _metadata[META_SERVER_FULL_PATH]; +- _metaFilePath = _mediaFilePath + "."MEDIA_TYPE_META; +- _seekFilePath = _mediaFilePath + "."MEDIA_TYPE_SEEK; ++ _metaFilePath = _mediaFilePath + "." MEDIA_TYPE_META; ++ _seekFilePath = _mediaFilePath + "." MEDIA_TYPE_SEEK; + _keyframeSeek = (bool)_metadata[CONF_APPLICATION_KEYFRAMESEEK]; + _seekGranularity = (uint32_t) _metadata[CONF_APPLICATION_SEEKGRANULARITY]; + +@@ -80,7 +80,7 @@ bool BaseMediaDocument::Process() { + + GETCLOCKS(endTime); + +- INFO("%"PRIz"u frames computed in %.2f seconds at a speed of %.2f FPS", ++ INFO("%" PRIz"u frames computed in %.2f seconds at a speed of %.2f FPS", + _frames.size(), + (endTime - startTime) / (double) CLOCKS_PER_SECOND, + (double) _frames.size() / ((endTime - startTime) / (double) CLOCKS_PER_SECOND)); +@@ -89,7 +89,7 @@ bool BaseMediaDocument::Process() { + uint32_t hours = totalSeconds / 3600; + uint32_t minutes = (totalSeconds - hours * 3600) / 60; + uint32_t seconds = (totalSeconds - hours * 3600 - minutes * 60); +- INFO("File size: %"PRIu64" bytes; Duration: %u:%u:%u (%u sec); Optimal bandwidth: %.2f kb/s", ++ INFO("File size: %" PRIu64" bytes; Duration: %u:%u:%u (%u sec); Optimal bandwidth: %.2f kb/s", + _mediaFile.Size(), + hours, minutes, seconds, + totalSeconds, +@@ -167,7 +167,7 @@ bool BaseMediaDocument::SaveSeekFile() { + FOR_VECTOR(_frames, i) { + MediaFrame frame = _frames[i]; + if (maxFrameSize < frame.length) { +- //WARN("maxFrameSize bumped up: %"PRIu64" -> %"PRIu64, maxFrameSize, frame.length); ++ //WARN("maxFrameSize bumped up: %" PRIu64" -> %" PRIu64, maxFrameSize, frame.length); + maxFrameSize = frame.length; + } + hasVideo |= (frame.type == MEDIAFRAME_TYPE_VIDEO); +--- crtmpserver-1.0~dfsg.orig/thelib/src/mediaformats/flv/flvdocument.cpp ++++ crtmpserver-1.0~dfsg/thelib/src/mediaformats/flv/flvdocument.cpp +@@ -82,7 +82,7 @@ bool FLVDocument::BuildFrames() { + frame.type = MEDIAFRAME_TYPE_DATA; + break; + default: +- WARN("Invalid tag type: %hhu at cursor %"PRIu64, tagType, _mediaFile.Cursor()); ++ WARN("Invalid tag type: %hhu at cursor %" PRIu64, tagType, _mediaFile.Cursor()); + mustBreak = true; + break; + } +--- crtmpserver-1.0~dfsg.orig/thelib/src/mediaformats/mp3/mp3document.cpp ++++ crtmpserver-1.0~dfsg/thelib/src/mediaformats/mp3/mp3document.cpp +@@ -174,7 +174,7 @@ bool MP3Document::BuildFrames() { + frame.length = _frameSizes[version][layer][bitRateIndex] + [sampleRateIndex][paddingBit]; + if (frame.length == 0) { +- FATAL("Invalid frame length: %hhu:%hhu:%hhu:%hhu:%hhu; Cusror: %"PRIx64, ++ FATAL("Invalid frame length: %hhu:%hhu:%hhu:%hhu:%hhu; Cusror: %" PRIx64, + version, layer, bitRateIndex, sampleRateIndex, + paddingBit, _mediaFile.Cursor()); + return false; +@@ -192,7 +192,7 @@ bool MP3Document::BuildFrames() { + + //7. Seek to the next frame + if (!_mediaFile.SeekTo(frame.start + frame.length)) { +- WARN("Unable to seek to %"PRIx64, frame.start + frame.length); ++ WARN("Unable to seek to %" PRIx64, frame.start + frame.length); + break; + } + +--- crtmpserver-1.0~dfsg.orig/thelib/src/mediaformats/mp4/baseatom.cpp ++++ crtmpserver-1.0~dfsg/thelib/src/mediaformats/mp4/baseatom.cpp +@@ -60,7 +60,7 @@ MP4Document * BaseAtom::GetDoc() { + } + + BaseAtom::operator string() { +- return format("S: %"PRIu64"(0x%"PRIx64"); L: %"PRIu64"(0x%"PRIx64"); T: %u(%s)", ++ return format("S: %" PRIu64"(0x%" PRIx64"); L: %" PRIu64"(0x%" PRIx64"); T: %u(%s)", + _start, _start, _size, _size, GetTypeNumeric(), STR(GetTypeString())); + } + +@@ -83,7 +83,7 @@ void BaseAtom::SetParentAtom(BaseAtom *p + + bool BaseAtom::SkipRead(bool issueWarn) { + if (issueWarn) +- WARN("Atom type %s skipped. Position 0x%"PRIx64"(%"PRIu64"); Size: 0x%"PRIx64"(%"PRIu64")", ++ WARN("Atom type %s skipped. Position 0x%" PRIx64"(%" PRIu64"); Size: 0x%" PRIx64"(%" PRIu64")", + STR(GetTypeString()), _start, _start, _size, _size); + return _pDoc->GetMediaFile().SeekTo(_start + _size); + } +@@ -94,7 +94,7 @@ uint64_t BaseAtom::CurrentPosition() { + + bool BaseAtom::CheckBounds(uint64_t size) { + if (CurrentPosition() + size > _start + _size) { +- FATAL("Reached the end of the atom: Current pos: %"PRIu64"; Wanted size: %"PRIu64"; atom start: %"PRIu64"; atom size: %"PRIu64, ++ FATAL("Reached the end of the atom: Current pos: %" PRIu64"; Wanted size: %" PRIu64"; atom start: %" PRIu64"; atom size: %" PRIu64, + CurrentPosition(), size, _start, _size); + return false; + } +--- crtmpserver-1.0~dfsg.orig/thelib/src/mediaformats/mp4/boxatom.cpp ++++ crtmpserver-1.0~dfsg/thelib/src/mediaformats/mp4/boxatom.cpp +@@ -40,7 +40,7 @@ bool BoxAtom::Read() { + } + if (!pAtom->IsIgnored()) { + if (!AtomCreated(pAtom)) { +- FATAL("Unable to signal AtomCreated for atom %s (%"PRIx64")", ++ FATAL("Unable to signal AtomCreated for atom %s (%" PRIx64")", + STR(GetTypeString()), _start); + return false; + } +--- crtmpserver-1.0~dfsg.orig/thelib/src/mediaformats/mp4/mp4document.cpp ++++ crtmpserver-1.0~dfsg/thelib/src/mediaformats/mp4/mp4document.cpp +@@ -290,7 +290,7 @@ BaseAtom * MP4Document::ReadAtom(BaseAto + } + + if (currentPos + pAtom->GetSize() != _mediaFile.Cursor()) { +- FATAL("atom start: %"PRIu64"; Atom size: %"PRIu64"; currentPos: %"PRIu64, ++ FATAL("atom start: %" PRIu64"; Atom size: %" PRIu64"; currentPos: %" PRIu64, + currentPos, pAtom->GetSize(), _mediaFile.Cursor()); + return NULL; + } +@@ -415,7 +415,7 @@ bool MP4Document::BuildFrames() { + FATAL("Unable to initialize AAC codec"); + return false; + } +- // FINEST("Start: %"PRIu64" (%"PRIx64"); Length: %"PRIu64" (%"PRIx64");", ++ // FINEST("Start: %" PRIu64" (%" PRIx64"); Length: %" PRIu64" (%" PRIx64");", + // audioHeader.start, audioHeader.start, audioHeader.length, + // audioHeader.length); + } else { +@@ -568,16 +568,16 @@ bool MP4Document::BuildMOOVFrames(bool a + if (pCTSS != NULL) { + compositionOffsets = pCTSS->GetEntries(); + if (sampleSize.size() != compositionOffsets.size()) { +- WARN("composition offsets count != samples count; compositionOffsets: %"PRIz"u; sampleSize.size: %"PRIz"u", ++ WARN("composition offsets count != samples count; compositionOffsets: %" PRIz"u; sampleSize.size: %" PRIz"u", + compositionOffsets.size(), + sampleSize.size()); + for (uint32_t i = compositionOffsets.size(); i < sampleSize.size(); i++) + ADD_VECTOR_END(compositionOffsets, 0); +- WARN("composition offsets padded with 0. Now size is %"PRIz"u", ++ WARN("composition offsets padded with 0. Now size is %" PRIz"u", + compositionOffsets.size()); + } + } +- INFO("audio: %hhu; keyFrames: %"PRIz"u; frames: %"PRIz"u; compositionOffsets: %"PRIz"u", ++ INFO("audio: %hhu; keyFrames: %" PRIz"u; frames: %" PRIz"u; compositionOffsets: %" PRIz"u", + audio, keyFrames.size(), sampleSize.size(), compositionOffsets.size()); + + uint32_t timeScale = pMDHD->GetTimeScale(); +@@ -743,12 +743,12 @@ string MP4Document::Hierarchy() { + AtomTRAK * MP4Document::GetTRAK(bool audio) { + if (_pMOOV == NULL) { + FATAL("Unable to find moov"); +- return false; ++ return 0; + } + vector<AtomTRAK *> tracks = _pMOOV->GetTracks(); + if (tracks.size() == 0) { + FATAL("No tracks defined"); +- return false; ++ return 0; + } + for (uint32_t i = 0; i < tracks.size(); i++) { + AtomHDLR *pHDLR = (AtomHDLR *) tracks[i]->GetPath(2, A_MDIA, A_HDLR); +--- crtmpserver-1.0~dfsg.orig/thelib/src/mediaformats/nsv/nsvdocument.cpp ++++ crtmpserver-1.0~dfsg/thelib/src/mediaformats/nsv/nsvdocument.cpp +@@ -206,7 +206,7 @@ bool NSVDocument::ReadPayLoadData() { + // 06 - SEI NAL unit + if (NALU_TYPE_SEI == NALU_TYPE(nt)) { + // get binary header from payload data +- FINEST("video data offset %"PRIx64, _mediaFile.Cursor()); ++ FINEST("video data offset %" PRIx64, _mediaFile.Cursor()); + uint64_t currentCursor = _mediaFile.Cursor(); + _buffer.IgnoreAll(); + _buffer.ReadFromFs(_mediaFile, aux_plus_vidlen); +--- crtmpserver-1.0~dfsg.orig/thelib/src/netio/epoll/iohandlermanager.cpp ++++ crtmpserver-1.0~dfsg/thelib/src/netio/epoll/iohandlermanager.cpp +@@ -96,7 +96,7 @@ void IOHandlerManager::RegisterIOHandler + SetupToken(pIOHandler); + size_t before = _activeIOHandlers.size(); + _activeIOHandlers[pIOHandler->GetId()] = pIOHandler; +- DEBUG("Handlers count changed: %"PRIz"u->%"PRIz"u %s", before, before + 1, ++ DEBUG("Handlers count changed: %" PRIz"u->%" PRIz"u %s", before, before + 1, + STR(IOHandler::IOHTToString(pIOHandler->GetType()))); + } + +@@ -105,7 +105,7 @@ void IOHandlerManager::UnRegisterIOHandl + FreeToken(pIOHandler); + size_t before = _activeIOHandlers.size(); + _activeIOHandlers.erase(pIOHandler->GetId()); +- DEBUG("Handlers count changed: %"PRIz"u->%"PRIz"u %s", before, before - 1, ++ DEBUG("Handlers count changed: %" PRIz"u->%" PRIz"u %s", before, before - 1, + STR(IOHandler::IOHTToString(pIOHandler->GetType()))); + } + } +--- crtmpserver-1.0~dfsg.orig/thelib/src/netio/epoll/udpcarrier.cpp ++++ crtmpserver-1.0~dfsg/thelib/src/netio/epoll/udpcarrier.cpp +@@ -168,7 +168,7 @@ UDPCarrier* UDPCarrier::Create(string bi + } + uint32_t testVal = EHTONL(bindAddress.sin_addr.s_addr); + if ((testVal > 0xe0000000) && (testVal < 0xefffffff)) { +- INFO("Subscribe to multicast %s:%"PRIu16, STR(bindIp), bindPort); ++ INFO("Subscribe to multicast %s:%" PRIu16, STR(bindIp), bindPort); + if (ttl <= 255) { + if (!setFdMulticastTTL(sock, (uint8_t) ttl)) { + FATAL("Unable to set ttl"); +@@ -187,7 +187,7 @@ UDPCarrier* UDPCarrier::Create(string bi + } + if (bind(sock, (sockaddr *) & bindAddress, sizeof (sockaddr)) != 0) { + int error = errno; +- FATAL("Unable to bind on address: udp://%s:%"PRIu16"; Error was: %s (%"PRId32")", ++ FATAL("Unable to bind on address: udp://%s:%" PRIu16"; Error was: %s (%" PRId32")", + STR(bindIp), bindPort, strerror(error), error); + CLOSE_SOCKET(sock); + return NULL; +--- crtmpserver-1.0~dfsg.orig/thelib/src/netio/kqueue/iohandlermanager.cpp ++++ crtmpserver-1.0~dfsg/thelib/src/netio/kqueue/iohandlermanager.cpp +@@ -143,7 +143,7 @@ void IOHandlerManager::RegisterIOHandler + size_t before = _activeIOHandlers.size(); + _activeIOHandlers[pIOHandler->GetId()] = pIOHandler; + SetupToken(pIOHandler); +- DEBUG("Handlers count changed: %"PRIz"u->%"PRIz"u %s", before, before + 1, ++ DEBUG("Handlers count changed: %" PRIz"u->%" PRIz"u %s", before, before + 1, + STR(IOHandler::IOHTToString(pIOHandler->GetType()))); + } + +@@ -152,7 +152,7 @@ void IOHandlerManager::UnRegisterIOHandl + FreeToken(pIOHandler); + size_t before = _activeIOHandlers.size(); + _activeIOHandlers.erase(pIOHandler->GetId()); +- DEBUG("Handlers count changed: %"PRIz"u->%"PRIz"u %s", before, before - 1, ++ DEBUG("Handlers count changed: %" PRIz"u->%" PRIz"u %s", before, before - 1, + STR(IOHandler::IOHTToString(pIOHandler->GetType()))); + } + } +--- crtmpserver-1.0~dfsg.orig/thelib/src/netio/kqueue/udpcarrier.cpp ++++ crtmpserver-1.0~dfsg/thelib/src/netio/kqueue/udpcarrier.cpp +@@ -163,7 +163,7 @@ UDPCarrier* UDPCarrier::Create(string bi + } + uint32_t testVal = EHTONL(bindAddress.sin_addr.s_addr); + if ((testVal > 0xe0000000) && (testVal < 0xefffffff)) { +- INFO("Subscribe to multicast %s:%"PRIu16, STR(bindIp), bindPort); ++ INFO("Subscribe to multicast %s:%" PRIu16, STR(bindIp), bindPort); + if (ttl <= 255) { + if (!setFdMulticastTTL(sock, (uint8_t) ttl)) { + FATAL("Unable to set ttl"); +@@ -182,7 +182,7 @@ UDPCarrier* UDPCarrier::Create(string bi + } + if (bind(sock, (sockaddr *) & bindAddress, sizeof (sockaddr)) != 0) { + int error = errno; +- FATAL("Unable to bind on address: udp://%s:%"PRIu16"; Error was: %s (%"PRId32")", ++ FATAL("Unable to bind on address: udp://%s:%" PRIu16"; Error was: %s (%" PRId32")", + STR(bindIp), bindPort, strerror(error), error); + CLOSE_SOCKET(sock); + return NULL; +--- crtmpserver-1.0~dfsg.orig/thelib/src/netio/select/iohandlermanager.cpp ++++ crtmpserver-1.0~dfsg/thelib/src/netio/select/iohandlermanager.cpp +@@ -83,7 +83,7 @@ void IOHandlerManager::RegisterIOHandler + } + size_t before = _activeIOHandlers.size(); + _activeIOHandlers[pIOHandler->GetId()] = pIOHandler; +- DEBUG("Handlers count changed: %"PRIz"u->%"PRIz"u %s", before, before + 1, ++ DEBUG("Handlers count changed: %" PRIz"u->%" PRIz"u %s", before, before + 1, + STR(IOHandler::IOHTToString(pIOHandler->GetType()))); + } + +@@ -95,7 +95,7 @@ void IOHandlerManager::UnRegisterIOHandl + if (MAP_HAS1(_activeIOHandlers, pIOHandler->GetId())) { + size_t before = _activeIOHandlers.size(); + _activeIOHandlers.erase(pIOHandler->GetId()); +- DEBUG("Handlers count changed: %"PRIz"u->%"PRIz"u %s", before, before - 1, ++ DEBUG("Handlers count changed: %" PRIz"u->%" PRIz"u %s", before, before - 1, + STR(IOHandler::IOHTToString(pIOHandler->GetType()))); + } + } +--- crtmpserver-1.0~dfsg.orig/thelib/src/netio/select/udpcarrier.cpp ++++ crtmpserver-1.0~dfsg/thelib/src/netio/select/udpcarrier.cpp +@@ -164,7 +164,7 @@ UDPCarrier* UDPCarrier::Create(string bi + } + uint32_t testVal = EHTONL(bindAddress.sin_addr.s_addr); + if ((testVal > 0xe0000000) && (testVal < 0xefffffff)) { +- INFO("Subscribe to multicast %s:%"PRIu16, STR(bindIp), bindPort); ++ INFO("Subscribe to multicast %s:%" PRIu16, STR(bindIp), bindPort); + if (ttl <= 255) { + if (!setFdMulticastTTL(sock, (uint8_t) ttl)) { + FATAL("Unable to set ttl"); +@@ -183,7 +183,7 @@ UDPCarrier* UDPCarrier::Create(string bi + } + if (bind(sock, (sockaddr *) & bindAddress, sizeof (sockaddr)) != 0) { + int error = errno; +- FATAL("Unable to bind on address: udp://%s:%"PRIu16"; Error was: %s (%"PRId32")", ++ FATAL("Unable to bind on address: udp://%s:%" PRIu16"; Error was: %s (%" PRId32")", + STR(bindIp), bindPort, strerror(error), error); + CLOSE_SOCKET(sock); + return NULL; +--- crtmpserver-1.0~dfsg.orig/thelib/src/protocols/http/httpauthhelper.cpp ++++ crtmpserver-1.0~dfsg/thelib/src/protocols/http/httpauthhelper.cpp +@@ -279,7 +279,7 @@ bool HTTPAuthHelper::ParseAuthLine(strin + } + default: + { +- FATAL("Invalid stage: %"PRIu32, stage); ++ FATAL("Invalid stage: %" PRIu32, stage); + return false; + } + } +--- crtmpserver-1.0~dfsg.orig/thelib/src/protocols/protocolfactorymanager.cpp ++++ crtmpserver-1.0~dfsg/thelib/src/protocols/protocolfactorymanager.cpp +@@ -53,7 +53,7 @@ bool ProtocolFactoryManager::RegisterPro + + FOR_VECTOR(protocols, i) { + if (MAP_HAS1(_factoriesByProtocolId, protocols[i])) { +- FATAL("protocol %"PRIx64" already handled by factory %u", protocols[i], ++ FATAL("protocol %" PRIx64" already handled by factory %u", protocols[i], + _factoriesByProtocolId[protocols[i]]->GetId()); + return false; + } +@@ -137,7 +137,7 @@ BaseProtocol *ProtocolFactoryManager::Cr + + FOR_VECTOR(chain, i) { + if (!MAP_HAS1(_factoriesByProtocolId, chain[i])) { +- FATAL("protocol %"PRIx64" not handled by anyone", chain[i]); ++ FATAL("protocol %" PRIx64" not handled by anyone", chain[i]); + return NULL; + } + } +--- crtmpserver-1.0~dfsg.orig/thelib/src/protocols/rawhttpstream/inboundrawhttpstreamprotocol.cpp ++++ crtmpserver-1.0~dfsg/thelib/src/protocols/rawhttpstream/inboundrawhttpstreamprotocol.cpp +@@ -235,7 +235,7 @@ bool InboundRawHTTPStreamProtocol::SendC + _outputBuffer.ReadFromString(HTTP_HEADERS_SERVER": "HTTP_HEADERS_SERVER_US"\r\n"); + _outputBuffer.ReadFromString(HTTP_HEADERS_X_POWERED_BY": "HTTP_HEADERS_X_POWERED_BY_US"\r\n"); + _outputBuffer.ReadFromString(HTTP_HEADERS_CONTENT_TYPE": text/xml\r\n"); +- _outputBuffer.ReadFromString(format("%s: %"PRIu64"\r\n\r\n", HTTP_HEADERS_CONTENT_LENGTH, cd.Size())); ++ _outputBuffer.ReadFromString(format("%s: %" PRIu64"\r\n\r\n", HTTP_HEADERS_CONTENT_LENGTH, cd.Size())); + _outputBuffer.ReadFromFs(cd, cd.Size()); + //FINEST("_outputBuffer:\n%s", STR(_outputBuffer)); + if (!EnqueueForOutbound()) { +--- crtmpserver-1.0~dfsg.orig/thelib/src/protocols/rtmp/amf0serializer.cpp ++++ crtmpserver-1.0~dfsg/thelib/src/protocols/rtmp/amf0serializer.cpp +@@ -68,7 +68,7 @@ bool AMF0Serializer::ReadShortString(IOB + if (readType) { + AMF_CHECK_BOUNDARIES(buffer, 1); + if (GETIBPOINTER(buffer)[0] != AMF0_SHORT_STRING) { +- FATAL("AMF type not valid: want: %"PRIu8"; got: %"PRIu8, ++ FATAL("AMF type not valid: want: %" PRIu8"; got: %" PRIu8, + AMF0_SHORT_STRING, GETIBPOINTER(buffer)[0]); + return false; + } +@@ -88,7 +88,7 @@ bool AMF0Serializer::ReadShortString(IOB + AMF_CHECK_BOUNDARIES(buffer, length); + variant = string((char *) (GETIBPOINTER(buffer)), length); + if (!buffer.Ignore(length)) { +- FATAL("Unable to ignore %"PRIu16" bytes", length); ++ FATAL("Unable to ignore %" PRIu16" bytes", length); + return false; + } + return true; +@@ -110,7 +110,7 @@ bool AMF0Serializer::ReadLongString(IOBu + if (readType) { + AMF_CHECK_BOUNDARIES(buffer, 1); + if (GETIBPOINTER(buffer)[0] != AMF0_LONG_STRING) { +- FATAL("AMF type not valid: want: %"PRIu8"; got: %"PRIu8, ++ FATAL("AMF type not valid: want: %" PRIu8"; got: %" PRIu8, + AMF0_LONG_STRING, GETIBPOINTER(buffer)[0]); + return false; + } +@@ -131,7 +131,7 @@ bool AMF0Serializer::ReadLongString(IOBu + AMF_CHECK_BOUNDARIES(buffer, length); + variant = string((char *) (GETIBPOINTER(buffer)), length); + if (!buffer.Ignore(length)) { +- FATAL("Unable to ignore %"PRIu32" bytes", length); ++ FATAL("Unable to ignore %" PRIu32" bytes", length); + return false; + } + return true; +@@ -154,7 +154,7 @@ bool AMF0Serializer::ReadDouble(IOBuffer + if (readType) { + AMF_CHECK_BOUNDARIES(buffer, 1); + if (GETIBPOINTER(buffer)[0] != AMF0_NUMBER) { +- FATAL("AMF type not valid: want: %"PRIu8"; got: %"PRIu8, ++ FATAL("AMF type not valid: want: %" PRIu8"; got: %" PRIu8, + AMF0_NUMBER, GETIBPOINTER(buffer)[0]); + return false; + } +@@ -193,7 +193,7 @@ bool AMF0Serializer::ReadObject(IOBuffer + if (readType) { + AMF_CHECK_BOUNDARIES(buffer, 1); + if (GETIBPOINTER(buffer)[0] != AMF0_OBJECT) { +- FATAL("AMF type not valid: want: %"PRIu8"; got: %"PRIu8, ++ FATAL("AMF type not valid: want: %" PRIu8"; got: %" PRIu8, + AMF0_OBJECT, GETIBPOINTER(buffer)[0]); + return false; + } +@@ -292,7 +292,7 @@ bool AMF0Serializer::ReadMixedArray(IOBu + if (readType) { + AMF_CHECK_BOUNDARIES(buffer, 1); + if (GETIBPOINTER(buffer)[0] != AMF0_MIXED_ARRAY) { +- FATAL("AMF type not valid: want: %"PRIu8"; got: %"PRIu8, ++ FATAL("AMF type not valid: want: %" PRIu8"; got: %" PRIu8, + AMF0_MIXED_ARRAY, GETIBPOINTER(buffer)[0]); + return false; + } +@@ -405,7 +405,7 @@ bool AMF0Serializer::ReadArray(IOBuffer + if (readType) { + AMF_CHECK_BOUNDARIES(buffer, 1); + if (GETIBPOINTER(buffer)[0] != AMF0_ARRAY) { +- FATAL("AMF type not valid: want: %"PRIu8"; got: %"PRIu8, ++ FATAL("AMF type not valid: want: %" PRIu8"; got: %" PRIu8, + AMF0_ARRAY, GETIBPOINTER(buffer)[0]); + return false; + } +@@ -447,7 +447,7 @@ bool AMF0Serializer::ReadAMF3Object(IOBu + if (readType) { + AMF_CHECK_BOUNDARIES(buffer, 1); + if (GETIBPOINTER(buffer)[0] != AMF0_AMF3_OBJECT) { +- FATAL("AMF type not valid: want: %"PRIu8"; got: %"PRIu8, ++ FATAL("AMF type not valid: want: %" PRIu8"; got: %" PRIu8, + AMF0_AMF3_OBJECT, GETIBPOINTER(buffer)[0]); + return false; + } +@@ -483,7 +483,7 @@ bool AMF0Serializer::ReadBoolean(IOBuffe + if (readType) { + AMF_CHECK_BOUNDARIES(buffer, 1); + if (GETIBPOINTER(buffer)[0] != AMF0_BOOLEAN) { +- FATAL("AMF type not valid: want: %"PRIu8"; got: %"PRIu8, ++ FATAL("AMF type not valid: want: %" PRIu8"; got: %" PRIu8, + AMF0_BOOLEAN, GETIBPOINTER(buffer)[0]); + return false; + } +@@ -521,7 +521,7 @@ bool AMF0Serializer::ReadTimestamp(IOBuf + if (readType) { + AMF_CHECK_BOUNDARIES(buffer, 1); + if (GETIBPOINTER(buffer)[0] != AMF0_TIMESTAMP) { +- FATAL("AMF type not valid: want: %"PRIu8"; got: %"PRIu8, ++ FATAL("AMF type not valid: want: %" PRIu8"; got: %" PRIu8, + AMF0_TIMESTAMP, GETIBPOINTER(buffer)[0]); + return false; + } +@@ -567,7 +567,7 @@ bool AMF0Serializer::WriteTimestamp(IOBu + bool AMF0Serializer::ReadNull(IOBuffer &buffer, Variant &variant) { + AMF_CHECK_BOUNDARIES(buffer, 1); + if (GETIBPOINTER(buffer)[0] != AMF0_NULL) { +- FATAL("AMF type not valid: want: %"PRIu8"; got: %"PRIu8, ++ FATAL("AMF type not valid: want: %" PRIu8"; got: %" PRIu8, + AMF0_NULL, GETIBPOINTER(buffer)[0]); + return false; + } +@@ -590,7 +590,7 @@ bool AMF0Serializer::WriteNull(IOBuffer + bool AMF0Serializer::ReadUndefined(IOBuffer &buffer, Variant &variant) { + AMF_CHECK_BOUNDARIES(buffer, 1); + if (GETIBPOINTER(buffer)[0] != AMF0_UNDEFINED) { +- FATAL("AMF type not valid: want: %"PRIu8"; got: %"PRIu8, ++ FATAL("AMF type not valid: want: %" PRIu8"; got: %" PRIu8, + AMF0_UNDEFINED, GETIBPOINTER(buffer)[0]); + return false; + } +@@ -726,7 +726,7 @@ bool AMF0Serializer::Read(IOBuffer &buff + } + default: + { +- FATAL("Unable to de-serialize type %"PRIu8"; Buffer: %s", ++ FATAL("Unable to de-serialize type %" PRIu8"; Buffer: %s", + GETIBPOINTER(buffer)[0], STR(buffer)); + return false; + } +--- crtmpserver-1.0~dfsg.orig/thelib/src/protocols/rtmp/basertmpappprotocolhandler.cpp ++++ crtmpserver-1.0~dfsg/thelib/src/protocols/rtmp/basertmpappprotocolhandler.cpp +@@ -792,7 +792,7 @@ bool BaseRTMPAppProtocolHandler::Process + map<uint32_t, BaseOutStream *> subscribedOutStreams = + GetApplication()->GetStreamsManager()->GetWaitingSubscribers( + streamName, pInNetRTMPStream->GetType()); +- //FINEST("subscribedOutStreams count: %"PRIz"u", subscribedOutStreams.size()); ++ //FINEST("subscribedOutStreams count: %" PRIz"u", subscribedOutStreams.size()); + + + //7. Bind the waiting subscribers +@@ -1762,8 +1762,8 @@ Variant BaseRTMPAppProtocolHandler::GetM + + //7. Load the rest of the metadata from a cache or load it from file and + //cache it after that +- string metaPath = (string) result[META_SERVER_FULL_PATH] + "."MEDIA_TYPE_META; +- string seekPath = (string) result[META_SERVER_FULL_PATH] + "."MEDIA_TYPE_SEEK; ++ string metaPath = (string) result[META_SERVER_FULL_PATH] + "." MEDIA_TYPE_META; ++ string seekPath = (string) result[META_SERVER_FULL_PATH] + "." MEDIA_TYPE_SEEK; + bool regenerateFiles = true; + if (fileExists(metaPath) && fileExists(seekPath)) { + StreamCapabilities capabilities; +@@ -2102,7 +2102,7 @@ bool BaseRTMPAppProtocolHandler::Connect + // string tcUrl = format("%s://%s%s/%s", + // STR(uri.scheme()), + // STR(uri.host()), +-// STR(uri.portSpecified() ? format(":%"PRIu32) : ""), ++// STR(uri.portSpecified() ? format(":%" PRIu32) : ""), + // STR(appName)); + + //4. Get the user agent +--- crtmpserver-1.0~dfsg.orig/thelib/src/protocols/rtmp/basertmpprotocol.cpp ++++ crtmpserver-1.0~dfsg/thelib/src/protocols/rtmp/basertmpprotocol.cpp +@@ -222,7 +222,7 @@ void BaseRTMPProtocol::GetStats(Variant + + bool BaseRTMPProtocol::ResetChannel(uint32_t channelId) { + if (channelId >= MAX_CHANNELS_COUNT) { +- FATAL("Invalid channel id in reset message: %"PRIu32, channelId); ++ FATAL("Invalid channel id in reset message: %" PRIu32, channelId); + return false; + } + _channels[channelId].Reset(); +@@ -342,7 +342,7 @@ void BaseRTMPProtocol::TrySetOutboundChu + BaseStream * BaseRTMPProtocol::GetRTMPStream(uint32_t rtmpStreamId) { + if (rtmpStreamId == 0 || rtmpStreamId >= MAX_STREAMS_COUNT) { + FATAL("Invalid stream id: %u", rtmpStreamId); +- return false; ++ return 0; + } + return _streams[rtmpStreamId]; + } +@@ -464,7 +464,7 @@ BaseOutNetRTMPStream * BaseRTMPProtocol: + } + + if (_streams[streamId]->GetType() != ST_NEUTRAL_RTMP) { +- FATAL("Try to play a stream over a non neutral stream: id: %u; type: %"PRIu64, ++ FATAL("Try to play a stream over a non neutral stream: id: %u; type: %" PRIu64, + streamId, _streams[streamId]->GetType()); + return NULL; + } +@@ -719,7 +719,7 @@ bool BaseRTMPProtocol::ProcessBytes(IOBu + case RM_HEADER_MESSAGETYPE_VIDEODATA: + { + if (H_SI(header) >= MAX_STREAMS_COUNT) { +- FATAL("The server doesn't support stream ids bigger than %"PRIu32, ++ FATAL("The server doesn't support stream ids bigger than %" PRIu32, + (uint32_t) MAX_STREAMS_COUNT); + return false; + } +@@ -751,7 +751,7 @@ bool BaseRTMPProtocol::ProcessBytes(IOBu + case RM_HEADER_MESSAGETYPE_AUDIODATA: + { + if (H_SI(header) >= MAX_STREAMS_COUNT) { +- FATAL("The server doesn't support stream ids bigger than %"PRIu32, ++ FATAL("The server doesn't support stream ids bigger than %" PRIu32, + (uint32_t) MAX_STREAMS_COUNT); + return false; + } +--- crtmpserver-1.0~dfsg.orig/thelib/src/protocols/rtmp/header_le_ba.cpp ++++ crtmpserver-1.0~dfsg/thelib/src/protocols/rtmp/header_le_ba.cpp +@@ -346,7 +346,7 @@ bool Header::Write(IOBuffer &buffer) { + } + + Header::operator string() { +- return format("(RC: %"PRIu8"; HT: %"PRIu8"; CI: %02"PRIu32"; T: % 9"PRIu32"; L: % 6"PRIu32"; MT: % 2"PRIu8"; SI: % 2"PRIu32"; IA: %"PRIu8")", ++ return format("(RC: %" PRIu8"; HT: %" PRIu8"; CI: %02" PRIu32"; T: % 9" PRIu32"; L: % 6" PRIu32"; MT: % 2" PRIu8"; SI: % 2" PRIu32"; IA: %" PRIu8")", + readCompleted, ht, ci, hf.s.ts, hf.s.ml, hf.s.mt, hf.s.si, isAbsolute); + } + +--- crtmpserver-1.0~dfsg.orig/thelib/src/protocols/rtmp/inboundhttp4rtmp.cpp ++++ crtmpserver-1.0~dfsg/thelib/src/protocols/rtmp/inboundhttp4rtmp.cpp +@@ -143,7 +143,7 @@ BaseProtocol *InboundHTTP4RTMP::Bind(str + //14. This might be a new connection. Do we have that sid generated? + if (!MAP_HAS1(_generatedSids, sid)) { + FATAL("Invalid sid: %s", STR(sid)); +- return false; ++ return 0; + } + + //15. See if we have to generate a new connection or we just pick up +--- crtmpserver-1.0~dfsg.orig/thelib/src/protocols/rtmp/monitorrtmpprotocol.cpp ++++ crtmpserver-1.0~dfsg/thelib/src/protocols/rtmp/monitorrtmpprotocol.cpp +@@ -278,7 +278,7 @@ bool MonitorRTMPProtocol::ProcessBytes(I + if ((uint8_t) VH_MT(msg) == RM_HEADER_MESSAGETYPE_ABORTMESSAGE) { + uint32_t channelId = (uint32_t) msg[RM_ABORTMESSAGE]; + if (channelId >= _maxChannelsCount) { +- FATAL("Invalid channel id in reset message: %"PRIu32, channelId); ++ FATAL("Invalid channel id in reset message: %" PRIu32, channelId); + return false; + } + assert(_channels[channelId].id == channelId); +--- crtmpserver-1.0~dfsg.orig/thelib/src/protocols/rtmp/rtmpprotocolserializer.cpp ++++ crtmpserver-1.0~dfsg/thelib/src/protocols/rtmp/rtmpprotocolserializer.cpp +@@ -676,7 +676,7 @@ bool RTMPProtocolSerializer::Deserialize + Variant &message) { + AMF_CHECK_BOUNDARIES(buffer, 1); + if (GETIBPOINTER(buffer)[0] != 0) { +- FATAL("Encoding %"PRIu8" not supported yet", GETIBPOINTER(buffer)[0]); ++ FATAL("Encoding %" PRIu8" not supported yet", GETIBPOINTER(buffer)[0]); + return false; + } + +--- crtmpserver-1.0~dfsg.orig/thelib/src/protocols/rtmp/streaming/baseoutnetrtmpstream.cpp ++++ crtmpserver-1.0~dfsg/thelib/src/protocols/rtmp/streaming/baseoutnetrtmpstream.cpp +@@ -64,7 +64,7 @@ BaseOutNetRTMPStream::BaseOutNetRTMPStre + _videoCurrentFrameDropped = false; + _maxBufferSize = 65536 * 2; + _attachedStreamType = 0; +- _clientId = format("%d_%d_%"PRIz"u", _pProtocol->GetId(), _rtmpStreamId, (size_t)this); ++ _clientId = format("%d_%d_%" PRIz"u", _pProtocol->GetId(), _rtmpStreamId, (size_t)this); + + _paused = false; + +--- crtmpserver-1.0~dfsg.orig/thelib/src/protocols/rtmp/streaming/debugging.patch ++++ crtmpserver-1.0~dfsg/thelib/src/protocols/rtmp/streaming/debugging.patch +@@ -112,7 +112,7 @@ Index: ../../sources/thelib/src/protocol + + bool BaseRTMPProtocol::SendRawData(Header &header, Channel &channel, uint8_t *pData, + uint32_t length) { +-+ FINEST("URSI: %"PRIu32"; length: %"PRIu32, header._uniqueRTMPStreamId, length); +++ FINEST("URSI: %" PRIu32"; length: %" PRIu32, header._uniqueRTMPStreamId, length); + #ifdef ENFORCE_RTMP_OUTPUT_CHECKS + _intermediateBuffer.IgnoreAll(); + if (!header.Write(channel, _intermediateBuffer)) { +@@ -122,7 +122,7 @@ Index: ../../sources/thelib/src/protocol + + -bool BaseRTMPProtocol::SendRawData(uint8_t *pData, uint32_t length) { + +bool BaseRTMPProtocol::SendRawData(uint8_t *pData, uint32_t length, uint32_t uniqueRTMPStreamId) { +-+ FINEST("URSI: %"PRIu32"; length: %"PRIu32, uniqueRTMPStreamId, length); +++ FINEST("URSI: %" PRIu32"; length: %" PRIu32, uniqueRTMPStreamId, length); + #ifdef ENFORCE_RTMP_OUTPUT_CHECKS + _intermediateBuffer.IgnoreAll(); + _intermediateBuffer.ReadFromBuffer(pData, length); +@@ -206,7 +206,7 @@ Index: ../../sources/thelib/src/protocol + + return true; + + channel.state = CS_HEADER; + + _selectedChannel = -1; +-+ FINEST("%"PRIu32"; input: %s; channel.lastInProcBytes: %"PRIu32"; wanted: %"PRIu32, +++ FINEST("%" PRIu32"; input: %s; channel.lastInProcBytes: %" PRIu32"; wanted: %" PRIu32, + + GetId(), + + STR(header), + + channel.lastInProcBytes, +@@ -226,7 +226,7 @@ Index: ../../sources/thelib/src/protocol + - if (H_SI(header) >= MAX_STREAMS_COUNT) { + - FATAL("Incorrect stream index"); + + if (H_SI(header) >= MAX_STREAMS_COUNT) { +-+ FATAL("The server doesn't support stream ids bigger than %"PRIu32, +++ FATAL("The server doesn't support stream ids bigger than %" PRIu32, + + (uint32_t) MAX_STREAMS_COUNT); + + return false; + + } +@@ -291,7 +291,7 @@ Index: ../../sources/thelib/src/protocol + - if (H_SI(header) >= MAX_STREAMS_COUNT) { + - FATAL("Incorrect stream index"); + + if (H_SI(header) >= MAX_STREAMS_COUNT) { +-+ FATAL("The server doesn't support stream ids bigger than %"PRIu32, +++ FATAL("The server doesn't support stream ids bigger than %" PRIu32, + + (uint32_t) MAX_STREAMS_COUNT); + + return false; + + } +@@ -424,12 +424,12 @@ Index: ../../sources/thelib/src/protocol + + _videoCurrentFrameDropped = false; + _maxBufferSize = 65536 * 2; + _attachedStreamType = 0; +- _clientId = format("%d_%d_%"PRIz"u", _pProtocol->GetId(), _rtmpStreamId, (size_t)this); ++ _clientId = format("%d_%d_%" PRIz"u", _pProtocol->GetId(), _rtmpStreamId, (size_t)this); + @@ -167,6 +169,10 @@ + bool BaseOutNetRTMPStream::FeedData(uint8_t *pData, uint32_t dataLength, + uint32_t processedLength, uint32_t totalLength, + double absoluteTimestamp, bool isAudio) { +-+ string str = format("### ursi: %"PRIu32"; DL: % 6"PRIu32"; processedLength: % 6"PRIu32"; totalLength: % 6"PRIu32"; isAudio: %d", +++ string str = format("### ursi: %" PRIu32"; DL: % 6" PRIu32"; processedLength: % 6" PRIu32"; totalLength: % 6" PRIu32"; isAudio: %d", + + _uniqueId, dataLength, processedLength, totalLength, isAudio); + + FINEST("%s", STR(str)); + + assert(((BaseRTMPProtocol *) _pInStream->GetProtocol())->___lastInProcBytes == processedLength); +@@ -595,18 +595,18 @@ Index: ../../sources/thelib/src/protocol + + if (!isAudio) _path[(_pathIdx++) % 65536] = __LINE__; + + if (currentFrameDropped) { + + if (!isAudio) _path[(_pathIdx++) % 65536] = __LINE__; +-+ FINEST("Frame already dropped on URSI: %"PRIu32, _uniqueId); +++ FINEST("Frame already dropped on URSI: %" PRIu32, _uniqueId); + + //current frame was dropped. Test to see if we are in the middle + + //of it or this is a new one + + if (totalProcessed != 0) { + + if (!isAudio) _path[(_pathIdx++) % 65536] = __LINE__; +-+ FINEST("(middle) Frame already dropped on URSI: %"PRIu32, _uniqueId); +++ FINEST("(middle) Frame already dropped on URSI: %" PRIu32, _uniqueId); + + //we are in the middle of it. Don't allow execution + + bytesCounter += dataLength; + + return false; + + } else { + + if (!isAudio) _path[(_pathIdx++) % 65536] = __LINE__; +-+ FINEST("Exiting frame dropped state on URSI: %"PRIu32, _uniqueId); +++ FINEST("Exiting frame dropped state on URSI: %" PRIu32, _uniqueId); + + //this is a new frame. We will detect later if it can be sent + + currentFrameDropped = false; + } +@@ -649,7 +649,7 @@ Index: ../../sources/thelib/src/protocol + + packetsCounter++; + + bytesCounter += dataLength; + + currentFrameDropped = true; +-+ FINEST("Drop frame on URSI: %"PRIu32, _uniqueId); +++ FINEST("Drop frame on URSI: %" PRIu32, _uniqueId); + + return false; + } else { + - // we are not allowed to drop frames +@@ -765,7 +765,7 @@ Index: ../../sources/thelib/src/protocol + - // return format("(RC: %u; HT: %u; CI: %02u; T: % 9u; L: % 6u; MT: % 2u; SI: % 2u; IA: %u)", + - // readCompleted, ht, ci, hf.s.ts, hf.s.ml, hf.s.mt, hf.s.si, isAbsolute); + - return "not yet implemented"; +-+ return format("(RC: %"PRIu8"; HT: %"PRIu8"; CI: %02"PRIu32"; T: % 9"PRIu32"; L: % 6"PRIu32"; MT: % 2"PRIu8"; SI: % 2"PRIu32"; IA: %"PRIu8"; URSI: %"PRIu32")", +++ return format("(RC: %" PRIu8"; HT: %" PRIu8"; CI: %02" PRIu32"; T: % 9" PRIu32"; L: % 6" PRIu32"; MT: % 2" PRIu8"; SI: % 2" PRIu32"; IA: %" PRIu8"; URSI: %" PRIu32")", + + readCompleted, ht, ci, hf.s.ts, hf.s.ml, hf.s.mt, hf.s.si, isAbsolute, _uniqueRTMPStreamId); + } + +--- crtmpserver-1.0~dfsg.orig/thelib/src/protocols/rtmp/streaming/infilertmpnsvstream.cpp_ ++++ crtmpserver-1.0~dfsg/thelib/src/protocols/rtmp/streaming/infilertmpnsvstream.cpp_ +@@ -68,13 +68,13 @@ bool InFileRTMPNSVStream::BuildFrame(Fil + + //1. Seek into the data file at the correct position + if (!pFile->SeekTo(mediaFrame.start)) { +- FATAL("Unable to seek to position %"PRIu64, mediaFrame.start); ++ FATAL("Unable to seek to position %" PRIu64, mediaFrame.start); + return false; + } + + //3. Read the data + if (!buffer.ReadFromFs(*pFile, (uint32_t) mediaFrame.length)) { +- FATAL("Unable to read %"PRIu64" bytes from offset %"PRIu64, mediaFrame.length, mediaFrame.start); ++ FATAL("Unable to read %" PRIu64" bytes from offset %" PRIu64, mediaFrame.length, mediaFrame.start); + return false; + } + +@@ -104,13 +104,13 @@ bool InFileRTMPNSVStream::BuildFrame(Fil + + //1. Seek into the data file at the correct position + if (!pFile->SeekTo(mediaFrame.start)) { +- FATAL("Unable to seek to position %"PRIu64, mediaFrame.start); ++ FATAL("Unable to seek to position %" PRIu64, mediaFrame.start); + return false; + } + + //3. Read the data + if (!buffer.ReadFromFs(*pFile, (uint32_t) mediaFrame.length)) { +- FATAL("Unable to read %"PRIu64" bytes from offset %"PRIu64, mediaFrame.length, mediaFrame.start); ++ FATAL("Unable to read %" PRIu64" bytes from offset %" PRIu64, mediaFrame.length, mediaFrame.start); + return false; + } + +@@ -133,13 +133,13 @@ bool InFileRTMPNSVStream::BuildFrameHead + + //1. Seek into the data file at the correct position + if (!pFile->SeekTo(mediaFrame.start)) { +- FATAL("Unable to seek to position %"PRIu64, mediaFrame.start); ++ FATAL("Unable to seek to position %" PRIu64, mediaFrame.start); + return false; + } + + IOBuffer pbuf; + if (!pbuf.ReadFromFs(*pFile, (uint32_t) mediaFrame.length)) { +- FATAL("Unable to read %"PRIu64" bytes from offset %"PRIu64, mediaFrame.length, mediaFrame.start); ++ FATAL("Unable to read %" PRIu64" bytes from offset %" PRIu64, mediaFrame.length, mediaFrame.start); + return false; + } + +--- crtmpserver-1.0~dfsg.orig/thelib/src/protocols/rtmp/streaming/infilertmpstream.cpp ++++ crtmpserver-1.0~dfsg/thelib/src/protocols/rtmp/streaming/infilertmpstream.cpp +@@ -74,12 +74,12 @@ bool InFileRTMPStream::AVCBuilder::Build + } + + if (!pFile->SeekTo(mediaFrame.start)) { +- FATAL("Unable to seek to position %"PRIu64, mediaFrame.start); ++ FATAL("Unable to seek to position %" PRIu64, mediaFrame.start); + return false; + } + + if (!buffer.ReadFromFs(*pFile, (uint32_t) mediaFrame.length)) { +- FATAL("Unable to read %"PRIu64" bytes from offset %"PRIu64, mediaFrame.length, mediaFrame.start); ++ FATAL("Unable to read %" PRIu64" bytes from offset %" PRIu64, mediaFrame.length, mediaFrame.start); + return false; + } + +@@ -107,13 +107,13 @@ bool InFileRTMPStream::AACBuilder::Build + + //2. Seek into the data file at the correct position + if (!pFile->SeekTo(mediaFrame.start)) { +- FATAL("Unable to seek to position %"PRIu64, mediaFrame.start); ++ FATAL("Unable to seek to position %" PRIu64, mediaFrame.start); + return false; + } + + //3. Read the data + if (!buffer.ReadFromFs(*pFile, (uint32_t) mediaFrame.length)) { +- FATAL("Unable to read %"PRIu64" bytes from offset %"PRIu64, mediaFrame.length, mediaFrame.start); ++ FATAL("Unable to read %" PRIu64" bytes from offset %" PRIu64, mediaFrame.length, mediaFrame.start); + return false; + } + +@@ -134,13 +134,13 @@ bool InFileRTMPStream::MP3Builder::Build + + //2. Seek into the data file at the correct position + if (!pFile->SeekTo(mediaFrame.start)) { +- FATAL("Unable to seek to position %"PRIu64, mediaFrame.start); ++ FATAL("Unable to seek to position %" PRIu64, mediaFrame.start); + return false; + } + + //3. Read the data + if (!buffer.ReadFromFs(*pFile, (uint32_t) mediaFrame.length)) { +- FATAL("Unable to read %"PRIu64" bytes from offset %"PRIu64, mediaFrame.length, mediaFrame.start); ++ FATAL("Unable to read %" PRIu64" bytes from offset %" PRIu64, mediaFrame.length, mediaFrame.start); + return false; + } + +@@ -159,13 +159,13 @@ bool InFileRTMPStream::PassThroughBuilde + MediaFrame &mediaFrame, IOBuffer &buffer) { + //1. Seek into the data file at the correct position + if (!pFile->SeekTo(mediaFrame.start)) { +- FATAL("Unable to seek to position %"PRIu64, mediaFrame.start); ++ FATAL("Unable to seek to position %" PRIu64, mediaFrame.start); + return false; + } + + //2. Read the data + if (!buffer.ReadFromFs(*pFile, (uint32_t) mediaFrame.length)) { +- FATAL("Unable to read %"PRIu64" bytes from offset %"PRIu64, mediaFrame.length, mediaFrame.start); ++ FATAL("Unable to read %" PRIu64" bytes from offset %" PRIu64, mediaFrame.length, mediaFrame.start); + return false; + } + +@@ -260,7 +260,7 @@ InFileRTMPStream *InFileRTMPStream::GetI + metadata[META_RTMP_META][HTTP_HEADERS_SERVER] = HTTP_HEADERS_SERVER_US; + if (!fileExists(metadata[META_SERVER_FULL_PATH])) { + FATAL("File not found. fullPath: `%s`", STR(metadata[META_SERVER_FULL_PATH])); +- return false; ++ return 0; + } + + InFileRTMPStream *pResult = NULL; +@@ -329,14 +329,14 @@ bool InFileRTMPStream::BuildFrame(FileCl + bool InFileRTMPStream::FeedMetaData(FileClass *pFile, MediaFrame &mediaFrame) { + //1. Seek into the data file at the correct position + if (!pFile->SeekTo(mediaFrame.start)) { +- FATAL("Unable to seek to position %"PRIu64, mediaFrame.start); ++ FATAL("Unable to seek to position %" PRIu64, mediaFrame.start); + return false; + } + + //2. Read the data + _metadataBuffer.IgnoreAll(); + if (!_metadataBuffer.ReadFromFs(*pFile, (uint32_t) mediaFrame.length)) { +- FATAL("Unable to read %"PRIu64" bytes from offset %"PRIu64, mediaFrame.length, mediaFrame.start); ++ FATAL("Unable to read %" PRIu64" bytes from offset %" PRIu64, mediaFrame.length, mediaFrame.start); + return false; + } + +--- crtmpserver-1.0~dfsg.orig/thelib/src/protocols/rtmp/streaming/innetrtmpstream.cpp ++++ crtmpserver-1.0~dfsg/thelib/src/protocols/rtmp/streaming/innetrtmpstream.cpp +@@ -33,7 +33,7 @@ InNetRTMPStream::InNetRTMPStream(BasePro + _rtmpStreamId = rtmpStreamId; + _chunkSize = chunkSize; + _channelId = channelId; +- _clientId = format("%d_%d_%"PRIz"u", _pProtocol->GetId(), _rtmpStreamId, (size_t)this); ++ _clientId = format("%d_%d_%" PRIz"u", _pProtocol->GetId(), _rtmpStreamId, (size_t)this); + _lastVideoTime = 0; + _lastAudioTime = 0; + _pOutFileRTMPFLVStream = NULL; +@@ -314,7 +314,7 @@ bool InNetRTMPStream::InitializeAudioCap + return false; + } + +- // FINEST("Cached the AAC audio codec initialization: %"PRIu32, ++ // FINEST("Cached the AAC audio codec initialization: %" PRIu32, + // GETAVAILABLEBYTESCOUNT(_audioCodecInit)); + + return true; +--- crtmpserver-1.0~dfsg.orig/thelib/src/protocols/rtmp/streaming/outnetrtmp4tsstream.cpp ++++ crtmpserver-1.0~dfsg/thelib/src/protocols/rtmp/streaming/outnetrtmp4tsstream.cpp +@@ -285,18 +285,18 @@ bool OutNetRTMP4TSStream::FeedVideoData( + // uint32_t cursor = 5; + // uint32_t computed = 5; + // string dbg; +-// dbg += format("5 bytes: %02"PRIx8" %02"PRIx8" %02"PRIx8" %02"PRIx8" %02"PRIx8"\n", ++// dbg += format("5 bytes: %02" PRIx8" %02" PRIx8" %02" PRIx8" %02" PRIx8" %02" PRIx8"\n", + // pBuffer[0], pBuffer[1], pBuffer[2], pBuffer[3], pBuffer[4]); + // while (cursor < length) { + // uint32_t size = ENTOHLP(pBuffer + cursor); +-// dbg += format("%s(%08"PRIx32")(%02"PRIx8"), ", ++// dbg += format("%s(%08" PRIx32")(%02" PRIx8"), ", + // STR(NALUToString(pBuffer[cursor + 4])), + // size, + // pBuffer[cursor + 4 + size - 1]); + // cursor += 4 + size; + // computed += 4 + size; + // } +-// dbg += format("\ncomputed: %"PRIu32"; available: %"PRIu32"; ok: %"PRIu8"\n", ++// dbg += format("\ncomputed: %" PRIu32"; available: %" PRIu32"; ok: %" PRIu8"\n", + // computed, length, computed == length); + // fprintf(stdout, "%s\n", STR(dbg)); + //} +--- crtmpserver-1.0~dfsg.orig/thelib/src/protocols/rtp/basertspappprotocolhandler.cpp ++++ crtmpserver-1.0~dfsg/thelib/src/protocols/rtp/basertspappprotocolhandler.cpp +@@ -1654,7 +1654,7 @@ string BaseRTSPAppProtocolHandler::Compu + //3. Prepare the body of the response + string result = ""; + result += "v=0\r\n"; +- result += format("o=- %"PRIu32" 0 IN IP4 %s\r\n", pFrom->GetId(), STR(nearAddress)); ++ result += format("o=- %" PRIu32" 0 IN IP4 %s\r\n", pFrom->GetId(), STR(nearAddress)); + result += "s=" + targetStreamName + "\r\n"; + result += "u=http://www.evostream.com\r\n"; + result += "e=cont...@evostream.com\r\n"; +--- crtmpserver-1.0~dfsg.orig/thelib/src/protocols/rtp/connectivity/inboundconnectivity.cpp ++++ crtmpserver-1.0~dfsg/thelib/src/protocols/rtp/connectivity/inboundconnectivity.cpp +@@ -243,7 +243,7 @@ bool InboundConnectivity::Initialize() { + map<uint32_t, BaseOutStream *> subscribedOutStreams = + pApplication->GetStreamsManager()->GetWaitingSubscribers( + _streamName, _pInStream->GetType()); +- //FINEST("subscribedOutStreams count: %"PRIz"u", subscribedOutStreams.size()); ++ //FINEST("subscribedOutStreams count: %" PRIz"u", subscribedOutStreams.size()); + + + //8. Bind the waiting subscribers +@@ -272,11 +272,11 @@ string InboundConnectivity::GetTransport + InboundRTPProtocol *pRTP = isAudio ? _pRTPAudio : _pRTPVideo; + RTCPProtocol *pRTCP = isAudio ? _pRTCPAudio : _pRTCPVideo; + if (isClient) { +- return format("RTP/AVP;unicast;client_port=%"PRIu16"-%"PRIu16, ++ return format("RTP/AVP;unicast;client_port=%" PRIu16"-%" PRIu16, + ((UDPCarrier *) pRTP->GetIOHandler())->GetNearEndpointPort(), + ((UDPCarrier *) pRTCP->GetIOHandler())->GetNearEndpointPort()); + } else { +- return format("RTP/AVP;unicast;client_port=%s;server_port=%"PRIu16"-%"PRIu16, ++ return format("RTP/AVP;unicast;client_port=%s;server_port=%" PRIu16"-%" PRIu16, + STR(track["portsOrChannels"]["all"]), + ((UDPCarrier *) pRTP->GetIOHandler())->GetNearEndpointPort(), + ((UDPCarrier *) pRTCP->GetIOHandler())->GetNearEndpointPort()); +--- crtmpserver-1.0~dfsg.orig/thelib/src/protocols/rtp/connectivity/outboundconnectivity.cpp ++++ crtmpserver-1.0~dfsg/thelib/src/protocols/rtp/connectivity/outboundconnectivity.cpp +@@ -124,20 +124,20 @@ void OutboundConnectivity::SetOutStream( + } + + string OutboundConnectivity::GetVideoPorts() { +- return format("%"PRIu16"-%"PRIu16, _videoDataPort, _videoRTCPPort); ++ return format("%" PRIu16"-%" PRIu16, _videoDataPort, _videoRTCPPort); + } + + string OutboundConnectivity::GetAudioPorts() { +- return format("%"PRIu16"-%"PRIu16, _audioDataPort, _audioRTCPPort); ++ return format("%" PRIu16"-%" PRIu16, _audioDataPort, _audioRTCPPort); + } + + string OutboundConnectivity::GetVideoChannels() { +- return format("%"PRIu8"-%"PRIu8, _rtpClient.videoDataChannel, ++ return format("%" PRIu8"-%" PRIu8, _rtpClient.videoDataChannel, + _rtpClient.videoRtcpChannel); + } + + string OutboundConnectivity::GetAudioChannels() { +- return format("%"PRIu8"-%"PRIu8, _rtpClient.audioDataChannel, ++ return format("%" PRIu8"-%" PRIu8, _rtpClient.audioDataChannel, + _rtpClient.audioRtcpChannel); + } + +--- crtmpserver-1.0~dfsg.orig/thelib/src/protocols/rtp/nattraversalprotocol.cpp ++++ crtmpserver-1.0~dfsg/thelib/src/protocols/rtp/nattraversalprotocol.cpp +@@ -60,12 +60,12 @@ bool NATTraversalProtocol::SignalInputDa + } + string ipAddress = inet_ntoa(_pOutboundAddress->sin_addr); + if (_pOutboundAddress->sin_port == pPeerAddress->sin_port) { +- INFO("The client has public endpoint: %s:%"PRIu16, ++ INFO("The client has public endpoint: %s:%" PRIu16, + STR(ipAddress), + ENTOHS(_pOutboundAddress->sin_port)); + } else { + +- INFO("The client is behind firewall: %s:%"PRIu16" -> %s:%"PRIu16, ++ INFO("The client is behind firewall: %s:%" PRIu16" -> %s:%" PRIu16, + STR(ipAddress), + ENTOHS(_pOutboundAddress->sin_port), + STR(ipAddress), +--- crtmpserver-1.0~dfsg.orig/thelib/src/protocols/rtp/rtspprotocol.cpp ++++ crtmpserver-1.0~dfsg/thelib/src/protocols/rtp/rtspprotocol.cpp +@@ -372,14 +372,14 @@ OutboundConnectivity * RTSPProtocol::Get + _pOutboundConnectivity = new OutboundConnectivity(forceTcp, this); + if (!_pOutboundConnectivity->Initialize()) { + FATAL("Unable to initialize outbound connectivity"); +- return false; ++ return 0; + } + pOutStream->SetConnectivity(_pOutboundConnectivity); + _pOutboundConnectivity->SetOutStream(pOutStream); + + if (!pInNetStream->Link(pOutStream)) { + FATAL("Unable to link streams"); +- return false; ++ return 0; + } + } + +@@ -463,7 +463,7 @@ bool RTSPProtocol::SendMessage(Variant & + + //2. Add the content length if required + if (content.size() > 0) { +- headers[RTSP_HEADERS][RTSP_HEADERS_CONTENT_LENGTH] = format("%"PRIz"u", content.size()); ++ headers[RTSP_HEADERS][RTSP_HEADERS_CONTENT_LENGTH] = format("%" PRIz"u", content.size()); + } + + //3. Add the session id if necessary +@@ -706,7 +706,7 @@ bool RTSPProtocol::HandleRTSPMessage(IOB + _inboundContent += string((char *) GETIBPOINTER(buffer), chunkLength); + buffer.Ignore(chunkLength); + if (_inboundContent.size() < _contentLength) { +- FINEST("Not enough data. Wanted: %u; got: %"PRIz"u", _contentLength, _inboundContent.size()); ++ FINEST("Not enough data. Wanted: %u; got: %" PRIz"u", _contentLength, _inboundContent.size()); + return true; + } + } +--- crtmpserver-1.0~dfsg.orig/thelib/src/protocols/rtp/sdp.cpp ++++ crtmpserver-1.0~dfsg/thelib/src/protocols/rtp/sdp.cpp +@@ -222,10 +222,10 @@ bool SDP::ParseTransportLine(string raw, + FATAL("Invalid transport line: %s", STR(raw)); + return false; + } +- all = format("%"PRIu16"-%"PRIu16, data, rtcp); ++ all = format("%" PRIu16"-%" PRIu16, data, rtcp); + } else { + data = atoi(STR(parts[0])); +- all = format("%"PRIu16, data); ++ all = format("%" PRIu16, data); + rtcp = 0; + } + if (all != raw) { +--- crtmpserver-1.0~dfsg.orig/thelib/src/protocols/rtp/streaming/innetrtpstream.cpp ++++ crtmpserver-1.0~dfsg/thelib/src/protocols/rtp/streaming/innetrtpstream.cpp +@@ -161,9 +161,9 @@ bool InNetRTPStream::FeedData(uint8_t *p + switch (_rtcpPresence) { + case RTCP_PRESENCE_UNKNOWN: + { +- DEBUG_RTCP_PRESENCE("RTCP_PRESENCE_UNKNOWN: %"PRIz"u", (time(NULL) - _rtcpDetectionStart)); ++ DEBUG_RTCP_PRESENCE("RTCP_PRESENCE_UNKNOWN: %" PRIz"u", (time(NULL) - _rtcpDetectionStart)); + if (_rtcpDetectionInterval == 0) { +- WARN("RTCP disabled on stream %s(%"PRIu32") with name %s. A/V drifting may occur over long periods of time", ++ WARN("RTCP disabled on stream %s(%" PRIu32") with name %s. A/V drifting may occur over long periods of time", + STR(tagToString(GetType())), GetUniqueId(), STR(GetName())); + _rtcpPresence = RTCP_PRESENCE_ABSENT; + return true; +@@ -173,7 +173,7 @@ bool InNetRTPStream::FeedData(uint8_t *p + return true; + } + if ((time(NULL) - _rtcpDetectionStart) > _rtcpDetectionInterval) { +- WARN("Stream %s(%"PRIu32") with name %s doesn't have RTCP. A/V drifting may occur over long periods of time", ++ WARN("Stream %s(%" PRIu32") with name %s doesn't have RTCP. A/V drifting may occur over long periods of time", + STR(tagToString(GetType())), GetUniqueId(), STR(GetName())); + _rtcpPresence = RTCP_PRESENCE_ABSENT; + return true; +@@ -195,7 +195,7 @@ bool InNetRTPStream::FeedData(uint8_t *p + videoRTCPPresent = true; + } + if (audioRTCPPresent && videoRTCPPresent) { +- DEBUG_RTCP_PRESENCE("RTCP available on stream %s(%"PRIu32") with name %s.", ++ DEBUG_RTCP_PRESENCE("RTCP available on stream %s(%" PRIu32") with name %s.", + STR(tagToString(GetType())), GetUniqueId(), STR(GetName())); + _rtcpPresence = RTCP_PRESENCE_AVAILABLE; + } +@@ -221,7 +221,7 @@ bool InNetRTPStream::FeedData(uint8_t *p + } + default: + { +- ASSERT("Invalid _rtcpPresence: %"PRIu8, _rtcpPresence); ++ ASSERT("Invalid _rtcpPresence: %" PRIu8, _rtcpPresence); + return false; + } + } +@@ -234,7 +234,7 @@ bool InNetRTPStream::FeedData(uint8_t *p + } + + if (lastTs * 100.00 > absoluteTimestamp * 100.00) { +- WARN("Back time on %s. ATS: %.08f LTS: %.08f; D: %.8f; isAudio: %"PRIu8, ++ WARN("Back time on %s. ATS: %.08f LTS: %.08f; D: %.8f; isAudio: %" PRIu8, + STR(GetName()), + absoluteTimestamp, + lastTs, +@@ -289,7 +289,7 @@ bool InNetRTPStream::FeedVideoData(uint8 + return true; + } else { + if ((uint16_t) (_videoSequence + 1) != (uint16_t) GET_RTP_SEQ(rtpHeader)) { +- WARN("Missing video packet. Wanted: %"PRIu16"; got: %"PRIu16" on stream: %s", ++ WARN("Missing video packet. Wanted: %" PRIu16"; got: %" PRIu16" on stream: %s", + (uint16_t) (_videoSequence + 1), + (uint16_t) GET_RTP_SEQ(rtpHeader), + STR(GetName())); +@@ -308,7 +308,7 @@ bool InNetRTPStream::FeedVideoData(uint8 + uint8_t naluType = NALU_TYPE(pData[0]); + if (naluType <= 23) { + //3. Standard NALU +- //FINEST("V: %08"PRIx32, rtpHeader._timestamp); ++ //FINEST("V: %08" PRIx32, rtpHeader._timestamp); + _videoPacketsCount++; + _videoBytesCount += dataLength; + return FeedData(pData, dataLength, 0, dataLength, ts, false); +@@ -329,7 +329,7 @@ bool InNetRTPStream::FeedVideoData(uint8 + //middle NAL + _currentNalu.ReadFromBuffer(pData + 2, dataLength - 2); + if (((pData[1] >> 6)&0x01) == 1) { +- //FINEST("V: %08"PRIx32, rtpHeader._timestamp); ++ //FINEST("V: %08" PRIx32, rtpHeader._timestamp); + _videoPacketsCount++; + _videoBytesCount += GETAVAILABLEBYTESCOUNT(_currentNalu); + if (!FeedData(GETIBPOINTER(_currentNalu), +@@ -387,7 +387,7 @@ bool InNetRTPStream::FeedAudioData(uint8 + return true; + } else { + if ((uint16_t) (_audioSequence + 1) != (uint16_t) GET_RTP_SEQ(rtpHeader)) { +- WARN("Missing audio packet. Wanted: %"PRIu16"; got: %"PRIu16" on stream: %s", ++ WARN("Missing audio packet. Wanted: %" PRIu16"; got: %" PRIu16" on stream: %s", + (uint16_t) (_audioSequence + 1), + (uint16_t) GET_RTP_SEQ(rtpHeader), + STR(GetName())); +@@ -402,7 +402,7 @@ bool InNetRTPStream::FeedAudioData(uint8 + //1. Compute chunks count + uint16_t chunksCount = ENTOHSP(pData); + if ((chunksCount % 16) != 0) { +- FATAL("Invalid AU headers length: %"PRIx16, chunksCount); ++ FATAL("Invalid AU headers length: %" PRIx16, chunksCount); + return false; + } + chunksCount = chunksCount / 16; +@@ -420,7 +420,7 @@ bool InNetRTPStream::FeedAudioData(uint8 + } + ts = (double) (rtpTs + i * 1024) / (double) _capabilities.aac._sampleRate * 1000.00; + if ((cursor + chunkSize) > dataLength) { +- FATAL("Unable to feed data: cursor: %"PRIu32"; chunkSize: %"PRIu16"; dataLength: %"PRIu32"; chunksCount: %"PRIu16, ++ FATAL("Unable to feed data: cursor: %" PRIu32"; chunkSize: %" PRIu16"; dataLength: %" PRIu32"; chunksCount: %" PRIu16, + cursor, chunkSize, dataLength, chunksCount); + return false; + } +--- crtmpserver-1.0~dfsg.orig/thelib/src/protocols/ssl/basesslprotocol.cpp ++++ crtmpserver-1.0~dfsg/thelib/src/protocols/ssl/basesslprotocol.cpp +@@ -223,8 +223,8 @@ string BaseSSLProtocol::DumpBIO(BIO *pBI + formatString += "next_bio: %p\n"; + formatString += "prev_bio: %p\n"; + formatString += "references: %d\n"; +- formatString += "num_read: %"PRId64"\n"; +- formatString += "num_write: %"PRId64; ++ formatString += "num_read: %" PRId64"\n"; ++ formatString += "num_write: %" PRId64; + return format(formatString, + pBIO->method, + pBIO->callback, +--- crtmpserver-1.0~dfsg.orig/thelib/src/protocols/ts/innettsstream.cpp ++++ crtmpserver-1.0~dfsg/thelib/src/protocols/ts/innettsstream.cpp +@@ -190,7 +190,7 @@ bool InNetTSStream::FeedData(uint8_t *pD + value = (value + roll)&0x1ffffffff; + #endif /* __FORCE_ROLL_OVER_FOR_DEBUG */ + #ifdef __DUMP_TIMESTAMP_INFO_FOR_DEBUG +- string dbg = format("%c lastRawPts: %09"PRIx64" -> value: %09"PRIx64"; ", isAudio ? 'A' : 'V', lastRawPts, value); ++ string dbg = format("%c lastRawPts: %09" PRIx64" -> value: %09" PRIx64"; ", isAudio ? 'A' : 'V', lastRawPts, value); + #endif /* __DUMP_TIMESTAMP_INFO_FOR_DEBUG */ + if (((lastRawPts >> 32) == 1) + && ((value >> 32) == 0)) { +@@ -202,7 +202,7 @@ bool InNetTSStream::FeedData(uint8_t *pD + lastRawPts = value; + value += (rollOverCount * 0x1ffffffffLL); + #ifdef __DUMP_TIMESTAMP_INFO_FOR_DEBUG +- dbg += format("final: %09"PRIx64"; ", value); ++ dbg += format("final: %09" PRIx64"; ", value); + #endif /* __DUMP_TIMESTAMP_INFO_FOR_DEBUG */ + double tempPtsTime = (double) value / 90.00; + if (ptsTime > tempPtsTime) { +--- crtmpserver-1.0~dfsg.orig/thelib/src/protocols/ts/tspacketpat.cpp ++++ crtmpserver-1.0~dfsg/thelib/src/protocols/ts/tspacketpat.cpp +@@ -61,14 +61,14 @@ TSPacketPAT::operator string() { + result += format("lastSectionNumber: %hhu\n", _lastSectionNumber); + result += format("crc: %x\n", _crc); + result += format("entriesCount: %u\n", _entriesCount); +- result += format("NIT count: %"PRIz"u\n", _networkPids.size()); ++ result += format("NIT count: %" PRIz"u\n", _networkPids.size()); + if (_networkPids.size() > 0) { + + FOR_MAP(_networkPids, uint16_t, uint16_t, i) { + result += format("\tNIT %hu: %hu\n", MAP_KEY(i), MAP_VAL(i)); + } + } +- result += format("PMT count: %"PRIz"u\n", _programPids.size()); ++ result += format("PMT count: %" PRIz"u\n", _programPids.size()); + if (_programPids.size() > 0) { + + FOR_MAP(_programPids, uint16_t, uint16_t, i) { +--- crtmpserver-1.0~dfsg.orig/thelib/src/protocols/ts/tspacketpmt.cpp ++++ crtmpserver-1.0~dfsg/thelib/src/protocols/ts/tspacketpmt.cpp +@@ -48,13 +48,13 @@ TSPacketPMT::operator string() { + result += format("reserved5: %hhu\n", _reserved5); + result += format("programInfoLength: %hu\n", _programInfoLength); + result += format("crc: %x\n", _crc); +- result += format("descriptors count: %"PRIz"u\n", _programInfoDescriptors.size()); ++ result += format("descriptors count: %" PRIz"u\n", _programInfoDescriptors.size()); + for (uint32_t i = 0; i < _programInfoDescriptors.size(); i++) { + result += format("\t%s", STR(_programInfoDescriptors[i])); + if (i != _programInfoDescriptors.size() - 1) + result += "\n"; + } +- result += format("streams count: %"PRIz"u\n", _streams.size()); ++ result += format("streams count: %" PRIz"u\n", _streams.size()); + + FOR_MAP(_streams, uint16_t, TSStreamInfo, i) { + result += format("\t%hu: %s\n", MAP_KEY(i), STR(MAP_VAL(i).toString(1))); +--- crtmpserver-1.0~dfsg.orig/thelib/src/streaming/baseinfilestream.cpp ++++ crtmpserver-1.0~dfsg/thelib/src/streaming/baseinfilestream.cpp +@@ -169,7 +169,7 @@ bool BaseInFileStream::ResolveCompleteMe + + bool BaseInFileStream::Initialize(int32_t clientSideBufferLength) { + //1. Check to see if we have an universal seeking file +- string seekFilePath = GetName() + "."MEDIA_TYPE_SEEK; ++ string seekFilePath = GetName() + "." MEDIA_TYPE_SEEK; + if (!fileExists(seekFilePath)) { + Variant temp; + temp[META_SERVER_FULL_PATH] = GetName(); +@@ -199,8 +199,8 @@ bool BaseInFileStream::Initialize(int32_ + } + if (!StreamCapabilities::Deserialize(raw, _streamCapabilities)) { + FATAL("Unable to deserialize stream Capabilities. Please delete %s and %s files so they can be regenerated", +- STR(GetName() + "."MEDIA_TYPE_SEEK), +- STR(GetName() + "."MEDIA_TYPE_META)); ++ STR(GetName() + "." MEDIA_TYPE_SEEK), ++ STR(GetName() + "." MEDIA_TYPE_META)); + return false; + } + +@@ -212,7 +212,7 @@ bool BaseInFileStream::Initialize(int32_ + //5. Compute the optimal window size by reading the biggest frame size + //from the seek file. + if (!_pSeekFile->SeekTo(_pSeekFile->Size() - 8)) { +- FATAL("Unable to seek to %"PRIu64" position", _pSeekFile->Cursor() - 8); ++ FATAL("Unable to seek to %" PRIu64" position", _pSeekFile->Cursor() - 8); + return false; + } + uint64_t maxFrameSize = 0; +@@ -237,7 +237,7 @@ bool BaseInFileStream::Initialize(int32_ + + //4. Read the frames count from the file + if (!_pSeekFile->SeekTo(_seekBaseOffset)) { +- FATAL("Unable to seek to _seekBaseOffset: %"PRIu64, _seekBaseOffset); ++ FATAL("Unable to seek to _seekBaseOffset: %" PRIu64, _seekBaseOffset); + return false; + } + if (!_pSeekFile->ReadUI32(&_totalFrames, false)) { +--- crtmpserver-1.0~dfsg.orig/thelib/src/streaming/streamcapabilities.cpp ++++ crtmpserver-1.0~dfsg/thelib/src/streaming/streamcapabilities.cpp +@@ -40,7 +40,7 @@ _VIDEO_AVC::~_VIDEO_AVC() { + + #define CHECK_BA_LIMITS(name,length) \ + if(ba.AvailableBits()<length) { \ +- FATAL("Unable to read `"name"` value. Not enough bits. Wanted: %u; Have: %u", \ ++ FATAL("Unable to read `" name "` value. Not enough bits. Wanted: %u; Have: %u", \ + (uint32_t)length, ba.AvailableBits()); \ + return false; \ + } +@@ -55,7 +55,7 @@ if(ba.AvailableBits()<length) { \ + { \ + uint64_t ___value___=0; \ + if(!ba.ReadExpGolomb(___value___)) { \ +- FATAL("Unable to read `"name"` value"); \ ++ FATAL("Unable to read `" name "` value"); \ + return false; \ + } \ + v[name]=(type)___value___; \ +@@ -463,10 +463,10 @@ bool _VIDEO_AVC::Deserialize(IOBuffer &s + + _VIDEO_AVC::operator string() { + string result; +- result += format("_spsLength: %"PRIu16"\n", _spsLength); +- result += format("_ppsLength: %"PRIu16"\n", _ppsLength); +- result += format("_rate: %"PRIu32"\n", _rate); +- result += format("WxH: %"PRIu32"x%"PRIu32, _width, _height); ++ result += format("_spsLength: %" PRIu16"\n", _spsLength); ++ result += format("_ppsLength: %" PRIu16"\n", _ppsLength); ++ result += format("_rate: %" PRIu32"\n", _rate); ++ result += format("WxH: %" PRIu32"x%" PRIu32, _width, _height); + return result; + } + +@@ -739,7 +739,7 @@ bool StreamCapabilities::Deserialize(str + return false; + } + if (length > 1024 * 1024) { +- FATAL("Invalid stream capabilities length in file %s: %"PRIu32, STR(seekFilePath), length); ++ FATAL("Invalid stream capabilities length in file %s: %" PRIu32, STR(seekFilePath), length); + return false; + } + +@@ -769,7 +769,7 @@ bool StreamCapabilities::Deserialize(IOB + } + uint64_t ver = ENTOHLLP(pBuffer); + if (ver != __STREAM_CAPABILITIES_VERSION) { +- FATAL("Invalid stream capabilities version. Wanted: %"PRIu64"; Got: %"PRIu64, ++ FATAL("Invalid stream capabilities version. Wanted: %" PRIu64"; Got: %" PRIu64, + __STREAM_CAPABILITIES_VERSION, ver); + return false; + } +--- crtmpserver-1.0~dfsg.orig/thelib/src/streaming/streamsmanager.cpp ++++ crtmpserver-1.0~dfsg/thelib/src/streaming/streamsmanager.cpp +@@ -102,7 +102,7 @@ map<uint32_t, BaseOutStream *> StreamsMa + shortSubscribers = FindByTypeByName(ST_OUT, shortName, true, false); + longSubscribers = FindByTypeByName(ST_OUT, streamName, true, false); + +- // FINEST("short count: %"PRIz"u; long count: %"PRIz"u", ++ // FINEST("short count: %" PRIz"u; long count: %" PRIz"u", + // shortSubscribers.size(), longSubscribers.size()); + + //3. merge them diff -Nru crtmpserver-1.0~dfsg/debian/patches/series crtmpserver-1.0~dfsg/debian/patches/series --- crtmpserver-1.0~dfsg/debian/patches/series 2013-06-23 18:38:30.000000000 +0200 +++ crtmpserver-1.0~dfsg/debian/patches/series 2016-07-30 04:23:15.000000000 +0200 @@ -7,3 +7,4 @@ 19_gcc_4_7_compatibility.diff 20_use_pkgconfig_for_tinyxml.diff 21_fix_ftbfs_kfreebsd.diff +22_fix_ftbfs_gcc-6.diff