The pthread_attr_getscope signature in pthread.cc does not match
its declaration as a C function in include/api/pthread.h header
and causes it to be exported as C++ symbol:

```C
pthread_attr_getscope(pthread_attr_t*, int*)
```

This patch adjusts the signature in the definition to match
the declaration to export the symbol properly:

```C
pthread_attr_getscope
```

Signed-off-by: Waldemar Kozaczuk <[email protected]>
---
 libc/pthread.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libc/pthread.cc b/libc/pthread.cc
index 2f0afb7f..60158b31 100644
--- a/libc/pthread.cc
+++ b/libc/pthread.cc
@@ -730,7 +730,7 @@ int pthread_attr_setscope(pthread_attr_t *attr, int scope)
     return 0;
 }
 
-int pthread_attr_getscope(pthread_attr_t *attr, int *scope)
+int pthread_attr_getscope(const pthread_attr_t *__restrict attr, int *scope)
 {
     *scope = PTHREAD_SCOPE_SYSTEM;
     return 0;
-- 
2.25.1

-- 
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osv-dev/20200612212846.28356-1-jwkozaczuk%40gmail.com.

Reply via email to