about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--nptl/sysdeps/unix/sysv/linux/fork.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/fork.c b/nptl/sysdeps/unix/sysv/linux/fork.c
index e75f9d51da..4cc13746ae 100644
--- a/nptl/sysdeps/unix/sysv/linux/fork.c
+++ b/nptl/sysdeps/unix/sysv/linux/fork.c
@@ -69,7 +69,9 @@ __libc_fork (void)
 
   _IO_list_lock ();
 
+#ifndef NDEBUG
   pid_t ppid = THREAD_GETMEM (THREAD_SELF, tid);
+#endif
 
 #ifdef ARCH_FORK
   pid = ARCH_FORK ();