]> 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)
committergithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sat, 3 May 2025 16:22:25 +0000 (16:22 +0000)
commit6fa0e264df69faedad1245c7e4d02125e8d7a292
tree56dd016abf398efafc6011248e3fc17bbf96a088
parent754dea319e1d9113a6db01a921e8e424c5c71ffa
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