Skip to content

Commit 4f98791

Browse files
committed
compat UPDATE add alloca.h check
1 parent 4198977 commit 4f98791

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

CMakeModules/UseCompat.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ macro(USE_COMPAT)
6767

6868
check_function_exists(timegm HAVE_TIMEGM)
6969

70+
check_include_file("alloca.h" HAVE_ALLOCA_H)
71+
7072
# crypt
7173
check_include_file("crypt.h" HAVE_CRYPT_H)
7274

compat/compat.h.in

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @author Michal Vasko <[email protected]>
44
* @brief compatibility functions header
55
*
6-
* Copyright (c) 2021 - 2023 CESNET, z.s.p.o.
6+
* Copyright (c) 2021 - 2025 CESNET, z.s.p.o.
77
*
88
* This source code is licensed under BSD 3-Clause License (the "License").
99
* You may not use this file except in compliance with the License.
@@ -18,12 +18,15 @@
1818
#define _GNU_SOURCE /* pthread_rwlock_t */
1919

2020
#cmakedefine HAVE_CRYPT_H
21-
2221
#ifdef HAVE_CRYPT_H
23-
# include <crypt.h>
22+
# include <crypt.h>
23+
#endif
24+
25+
#cmakedefine HAVE_ALLOCA_H
26+
#ifdef HAVE_ALLOCA_H
27+
# include <alloca.h>
2428
#endif
2529

26-
#include <alloca.h>
2730
#include <limits.h>
2831
#include <pthread.h>
2932
#include <stdarg.h>

0 commit comments

Comments
 (0)