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 <jessica.l.hamilton@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
This commit is contained in:
Trung Nguyen 2023-05-08 08:49:32 +10:00 committed by Jessica Hamilton
parent 19537d01d1
commit f967e2c0c7

View File

@ -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 <pthread.h>
#include <features.h>
#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_ */