[PATCH] Fix -Werror build for clang and FreeBSD
Submitted by Ting-Wei Lan
Assigned to Telepathy bugs list
Description
Please see the attached patch. It fixes build failure on FreeBSD with clang when -Werror is enabled.
Version: git master
Due to an influx of spam, we have had to impose restrictions on new accounts. Please see this wiki page for instructions on how to get full permissions. Sorry for the inconvenience.
Equinix is shutting down its operations with us on April 30, 2025. They have graciously supported us for almost 5 years, but all good things come to an end. We are expecting to transition to new infrastructure between late March and mid-April. We do not yet have a firm timeline for this, but it will involve (probably multiple) periods of downtime as we move our services whilst also changing them to be faster and more responsive. Any updates will be posted in freedesktop/freedesktop#2011 as it becomes clear, and any downtime will be announced with further broadcast messages.
added 5. Logger ~3494 labels
Replace -D_POSIX_SOURCE with -D_POSIX_C_SOURCE=200809L because the former macro limits POSIX standard version to 1003.1-1988 on FreeBSD, which causes atoll function to be unavailable.
-Wtautological-constant-out-of-range-compare is ignored in a g_return_val_if_fail because the warning cannot be avoided.
Self assignments are removed to prevent warnings.
Patch 121985, "Fix -Werror build for clang and FreeBSD":
Fix--Werror-build-for-clang-and-FreeBSD.patch
Ping ... It is annoying to see -Werror enabled without getting warnings fixed.