mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-29 04:09:35 +03:00
cmAffinity: Add include for CPU_ZERO on Alpine Linux
The definition of `CPU_ZERO` requires `<string.h>` to be included explicitly for `memset`. Since IWYU does not agree on other Linux platforms, use a pragma to silence the warning. Fixes: #19643
This commit is contained in:
@@ -12,6 +12,8 @@
|
||||
# define CM_HAVE_CPU_AFFINITY
|
||||
# include <pthread.h>
|
||||
# include <sched.h>
|
||||
// On some platforms CPU_ZERO needs memset but sched.h forgets string.h
|
||||
# include <string.h> // IWYU pragma: keep
|
||||
# if defined(__FreeBSD__)
|
||||
# include <pthread_np.h>
|
||||
# include <sys/cpuset.h>
|
||||
|
||||
Reference in New Issue
Block a user