From f967e2c0c73efb25581afdc95a838f7633e8c03b Mon Sep 17 00:00:00 2001 From: Trung Nguyen Date: Mon, 8 May 2023 08:49:32 +1000 Subject: [PATCH] headers/bsd: Export pthread_attr_get_np Exported `pthread_attr_get_np` under `_DEFAULT_SOURCE`. Otherwise, the presence of this function in `libroot.so` without a definition would confuse some configuration scripts. Change-Id: I623ebefc98800e9528dc48859c2aefc828821f27 Reviewed-on: https://review.haiku-os.org/c/haiku/+/6383 Reviewed-by: Jessica Hamilton Tested-by: Commit checker robot --- headers/compatibility/bsd/pthread.h | 33 +++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 headers/compatibility/bsd/pthread.h diff --git a/headers/compatibility/bsd/pthread.h b/headers/compatibility/bsd/pthread.h new file mode 100644 index 0000000000..4efcb74fca --- /dev/null +++ b/headers/compatibility/bsd/pthread.h @@ -0,0 +1,33 @@ +/* + * Copyright 2023 Haiku, Inc. All Rights Reserved. + * Distributed under the terms of the MIT License. + */ +#ifndef _BSD_PTHREAD_H_ +#define _BSD_PTHREAD_H_ + + +#include_next +#include + + +#ifdef _DEFAULT_SOURCE + + +#ifdef __cplusplus +extern "C" { +#endif + + +extern int pthread_attr_get_np(pthread_t thread, pthread_attr_t* attr); + + +#ifdef __cplusplus +} +#endif + + +#endif + + +#endif /* _BSD_PTHREAD_H_ */ +