]> 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:10:20 +0000 (12:10 -0600)
commite503b6d41ec09814c1142dd56aaf6e89683d1878
treecd0aa06831330a5cd79258d9c24e6eb9f1ab945f
parentc792210d499f47b358fad5e41b2cad815ddfa32c
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 13d2dd8535a803af7ac7b3d59a6fec63a24b74e1)
include/asterisk/lock.h