]> git.ipfire.org Git - thirdparty/asterisk.git/commit
lock.h: Add include for string.h when DEBUG_THREADS is defined.
authorGeorge Joseph <gjoseph@sangoma.com>
Fri, 2 May 2025 18:19:25 +0000 (12:19 -0600)
committerGeorge Joseph <gjoseph@sangoma.com>
Thu, 26 Jun 2025 18:25:12 +0000 (12:25 -0600)
commit679b0109d08e4b20b4a540409f82a37c054b0a4c
treefa1615331879d558b05de8bf5f04344336099095
parent1a3d09e34554d037cd04fb8f81dc86789919d6e8
lock.h: Add include for string.h when DEBUG_THREADS is defined.

When DEBUG_THREADS is defined, lock.h uses strerror(), which is defined
in the libc string.h file, to print warning messages. If the including
source file doesn't include string.h then strerror() won't be found and
and compile errors will be thrown. Since lock.h depends on this, string.h
is now included from there if DEBUG_THREADS is defined.  This way, including
source files don't have to worry about it.

(cherry picked from commit 8eaad114f4d77376c64a1ad88c05490ac67352c0)
include/asterisk/lock.h