]> 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>
Wed, 17 Sep 2025 17:40:14 +0000 (11:40 -0600)
commit7e8f566b49014410316a27f86206448de55bbbfe
tree8d8a07f9ab2ccc9028d3d7cf9db6400c43751c08
parent75106551f17878da4057eee8574cf7f8671eb98b
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.
include/asterisk/lock.h