about summary refs log tree commit diff
path: root/nptl/pthread_clockjoin.c
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/pthread_clockjoin.c')
-rw-r--r--nptl/pthread_clockjoin.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/nptl/pthread_clockjoin.c b/nptl/pthread_clockjoin.c
index 0baba1e83d..3d54fe588f 100644
--- a/nptl/pthread_clockjoin.c
+++ b/nptl/pthread_clockjoin.c
@@ -17,12 +17,16 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <time.h>
+#include <futex-internal.h>
 #include "pthreadP.h"
 
 int
 __pthread_clockjoin_np64 (pthread_t threadid, void **thread_return,
                           clockid_t clockid, const struct __timespec64 *abstime)
 {
+  if (!futex_abstimed_supported_clockid (clockid))
+    return EINVAL;
+
   return __pthread_clockjoin_ex (threadid, thread_return,
                                  clockid, abstime, true);
 }