Skip to content

Commit c1a4424

Browse files
authored
[libunwind] Move errno.h and signal.h includes under the block where they're needed (#78054)
Commit fc1c478 added includes of <signal.h> and <errno.h> to UnwindCursor.hpp. The library previously built on platforms where these headers are not provided. These headers should be included only in the case where they are actually needed, i.e. on Linux.
1 parent e7671bc commit c1a4424

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libunwind/src/UnwindCursor.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
#define __UNWINDCURSOR_HPP__
1313

1414
#include "cet_unwind.h"
15-
#include <errno.h>
16-
#include <signal.h>
1715
#include <stdint.h>
1816
#include <stdio.h>
1917
#include <stdlib.h>
@@ -35,6 +33,8 @@
3533
#if defined(_LIBUNWIND_TARGET_LINUX) && \
3634
(defined(_LIBUNWIND_TARGET_AARCH64) || defined(_LIBUNWIND_TARGET_RISCV) || \
3735
defined(_LIBUNWIND_TARGET_S390X))
36+
#include <errno.h>
37+
#include <signal.h>
3838
#include <sys/syscall.h>
3939
#include <sys/uio.h>
4040
#include <unistd.h>

0 commit comments

Comments
 (0)