Skip to content

Commit 3944bb0

Browse files
authored
zend call stack for DragonFlyBSD. (#12325)
Shares the same codepaths as FreeBSD for the most part.
1 parent f10e1b8 commit 3944bb0

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Zend/zend_call_stack.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@
3535
# include <sys/types.h>
3636
# endif
3737
#endif /* ZEND_WIN32 */
38-
#if defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__) || defined(__OpenBSD__) || defined(__NetBSD__)
38+
#if defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
3939
# include <pthread.h>
4040
#endif
41-
#ifdef __FreeBSD__
41+
#if defined(__FreeBSD__) || defined(__DragonFly__)
4242
# include <pthread_np.h>
4343
# include <sys/mman.h>
4444
# include <sys/sysctl.h>
@@ -251,7 +251,7 @@ static bool zend_call_stack_get_linux(zend_call_stack *stack)
251251
}
252252
#endif /* __linux__ */
253253

254-
#ifdef __FreeBSD__
254+
#if defined(__FreeBSD__) || defined(__DragonFly__)
255255
static bool zend_call_stack_is_main_thread(void)
256256
{
257257
int is_main = pthread_main_np();

Zend/zend_call_stack.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ static inline size_t zend_call_stack_default_size(void)
7676
#if defined(__FreeBSD__) || defined(__NetBSD__)
7777
return 4 * 1024 * 1024;
7878
#endif
79+
#if defined(__DragonFly__)
80+
return 2 * 1024 * 1024;
81+
#endif
7982
#ifdef __OpenBSD__
8083
return 512 * 1024;
8184
#endif

0 commit comments

Comments
 (0)