Skip to content

Commit 7660f36

Browse files
belynamj-xiong
authored andcommitted
prov/opx: Use getpid() instead of gettid() for POSIX compliancy.
The 'gettid()' function is not POSIX compliant, and older versions of glibc may not have that function available in unistd.h, causing a compile failure. This changes the call to 'getpid()', which is POSIX compliant and should always be present in glibc. Signed-off-by: Ben Lynam <[email protected]>
1 parent 262f9eb commit 7660f36

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

prov/opx/src/opx_debug.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ static void opx_debug_dump_backtrace(FILE *output)
228228
static void opx_debug_dump_endpoint(struct fi_opx_ep *opx_ep)
229229
{
230230
char hostname[HOST_NAME_MAX + 1];
231-
pid_t my_pid = gettid();
231+
pid_t my_pid = getpid();
232232

233233
int rc = gethostname(hostname, HOST_NAME_MAX);
234234
if (rc != 0) {

0 commit comments

Comments
 (0)