Skip to content

Commit 17855c4

Browse files
committed
checkasm: detect presence of sys/prctl.h
1 parent 741b6d2 commit 17855c4

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ AC_CHECK_HEADERS([net/netmap.h], AM_CONDITIONAL(HAVE_NETMAP, true), AM_CONDITION
188188
#include <net/if.h>])
189189

190190
# Checks for header files.
191-
AC_CHECK_HEADERS([fcntl.h stddef.h stdint.h stdlib.h string.h unistd.h sys/ioctl.h semaphore.h features.h net/if.h])
191+
AC_CHECK_HEADERS([fcntl.h stddef.h stdint.h stdlib.h string.h unistd.h sys/ioctl.h semaphore.h features.h net/if.h sys/prctl.h])
192192

193193
# Checks for typedefs, structures, and compiler characteristics.
194194
AC_HEADER_STDBOOL

tests/checkasm/checkasm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
#if HAVE_IO_H
6969
#include <io.h>
7070
#endif
71-
#if HAVE_PRCTL
71+
#if HAVE_SYS_PRCTL_H
7272
#include <sys/prctl.h>
7373
#endif
7474

@@ -766,7 +766,7 @@ int main(int argc, char *argv[])
766766
sigaction(SIGILL, &signal_handler_act, NULL);
767767
sigaction(SIGSEGV, &signal_handler_act, NULL);
768768
#endif
769-
#if HAVE_PRCTL && defined(PR_SET_UNALIGN)
769+
#if HAVE_SYS_PRCTL_H && defined(PR_SET_UNALIGN)
770770
prctl(PR_SET_UNALIGN, PR_UNALIGN_SIGBUS);
771771
#endif
772772
#if ARCH_ARM && HAVE_ARMV5TE_EXTERNAL

tests/checkasm/checkasm.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
#define HAVE_IO_H 0
4141
#define HAVE_ISATTY 1
4242
#define HAVE_MACH_ABSOLUTE_TIME 0
43-
#define HAVE_PRCTL 1
4443
#define HAVE_RDTSC 0
4544
#define HAVE_SETCONSOLETEXTATTRIBUTE 0
4645

0 commit comments

Comments
 (0)