Skip to content

Commit 6ccca02

Browse files
committed
add #define to Linux Thread.cpp for pthread_getname
1 parent 2eaae28 commit 6ccca02

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/ibmras/common/port/linux/Thread.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
/*
1818
* Functions that control thread behaviour
1919
*/
20-
20+
#ifndef _GNU_SOURCE
21+
#define _GNU_SOURCE
22+
#endif
2123
#include "pthread.h"
2224
#include "time.h"
2325
#include <semaphore.h>
@@ -109,7 +111,7 @@ void sleep(uint32 seconds) {
109111
pthread_cond_timedwait(&c, &m, &t);
110112
IBMRAS_DEBUG(finest,"Woke up");
111113
pthread_mutex_unlock(&m);
112-
114+
113115
pthread_mutex_lock(&condMapMux);
114116
condMap.erase(it);
115117
pthread_mutex_unlock(&condMapMux);
@@ -144,7 +146,7 @@ void stopAllThreads() {
144146
{
145147
// The attachment thread has been introduced by Oracle
146148
// in their late attach classes
147-
if(strncmp(theName, "Attachment", 10) == 0) {
149+
if(strncmp(theName, "Attachment", 10) == 0) {
148150
continue;
149151
}
150152
}

0 commit comments

Comments
 (0)