diff --git a/compat/compat.c b/compat/compat.c
index c455545..71e8176 100644
--- a/compat/compat.c
+++ b/compat/compat.c
@@ -3,7 +3,7 @@
  * @author Michal Vasko <mvasko@cesnet.cz>
  * @brief compatibility functions
  *
- * Copyright (c) 2020 CESNET, z.s.p.o.
+ * Copyright (c) 2021 CESNET, z.s.p.o.
  *
  * This source code is licensed under BSD 3-Clause License (the "License").
  * You may not use this file except in compliance with the License.
@@ -11,17 +11,21 @@
  *
  *     https://opensource.org/licenses/BSD-3-Clause
  */
-#include "compat.h"
-
 #define _POSIX_C_SOURCE 200809L /* fdopen, _POSIX_PATH_MAX, strdup */
 #define _ISOC99_SOURCE /* vsnprintf */
 
+#include "compat.h"
+
 #include <errno.h>
+#include <inttypes.h>
 #include <limits.h>
+#include <pthread.h>
 #include <stdarg.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <sys/time.h>
+#include <time.h>
 #include <unistd.h>
 
 #ifndef HAVE_VDPRINTF
@@ -76,6 +80,49 @@
 
 #endif
 
+#ifndef HAVE_GETLINE
+ssize_t
+getline(char **lineptr, size_t *n, FILE *stream)
+{
+    static char line[256];
+    char *ptr;
+    ssize_t len;
+
+    if (!lineptr || !n) {
+        errno = EINVAL;
+        return -1;
+    }
+
+    if (ferror(stream) || feof(stream)) {
+        return -1;
+    }
+
+    if (!fgets(line, 256, stream)) {
+        return -1;
+    }
+
+    ptr = strchr(line, '\n');
+    if (ptr) {
+        *ptr = '\0';
+    }
+
+    len = strlen(line);
+
+    if (len + 1 < 256) {
+        ptr = realloc(*lineptr, 256);
+        if (!ptr) {
+            return -1;
+        }
+        *lineptr = ptr;
+        *n = 256;
+    }
+
+    strcpy(*lineptr, line);
+    return len;
+}
+
+#endif
+
 #ifndef HAVE_STRNDUP
 char *
 strndup(const char *s, size_t n)
@@ -123,45 +170,12 @@
 
 #endif
 
-#ifndef HAVE_GETLINE
-ssize_t
-getline(char **lineptr, size_t *n, FILE *stream)
+#ifndef HAVE_STRCHRNUL
+char *
+strchrnul(const char *s, int c)
 {
-    static char line[256];
-    char *ptr;
-    ssize_t len;
-
-    if (!lineptr || !n) {
-        errno = EINVAL;
-        return -1;
-    }
-
-    if (ferror(stream) || feof(stream)) {
-        return -1;
-    }
-
-    if (!fgets(line, 256, stream)) {
-        return -1;
-    }
-
-    ptr = strchr(line, '\n');
-    if (ptr) {
-        *ptr = '\0';
-    }
-
-    len = strlen(line);
-
-    if (len + 1 < 256) {
-        ptr = realloc(*lineptr, 256);
-        if (!ptr) {
-            return -1;
-        }
-        *lineptr = ptr;
-        *n = 256;
-    }
-
-    strcpy(*lineptr, line);
-    return len;
+    char *p = strchr(s, c);
+    return p ? p : (char *)s + strlen(s);
 }
 
 #endif
@@ -184,3 +198,52 @@
 }
 
 #endif
+
+#ifndef HAVE_PTHREAD_MUTEX_TIMEDLOCK
+int
+pthread_mutex_timedlock(pthread_mutex_t *mutex, const struct timespec *abstime)
+{
+    int64_t nsec_diff;
+    int32_t diff;
+    struct timespec cur, dur;
+    int rc;
+
+    /* try to acquire the lock and, if we fail, sleep for 5ms. */
+    while ((rc = pthread_mutex_trylock(mutex)) == EBUSY) {
+        /* get real time */
+#ifdef CLOCK_REALTIME
+        clock_gettime(CLOCK_REALTIME, &cur);
+#else
+        struct timeval tv;
+
+        gettimeofday(&tv, NULL);
+        cur.tv_sec = (time_t)tv.tv_sec;
+        cur.tv_nsec = 1000L * (long)tv.tv_usec;
+#endif
+
+        /* get time diff */
+        nsec_diff = 0;
+        nsec_diff += (((int64_t)abstime->tv_sec) - ((int64_t)cur.tv_sec)) * 1000000000L;
+        nsec_diff += ((int64_t)abstime->tv_nsec) - ((int64_t)cur.tv_nsec);
+        diff = (nsec_diff ? nsec_diff / 1000000L : 0);
+
+        if (diff < 1) {
+            /* timeout */
+            break;
+        } else if (diff < 5) {
+            /* sleep until timeout */
+            dur.tv_sec = 0;
+            dur.tv_nsec = (long)diff * 1000000;
+        } else {
+            /* sleep 5 ms */
+            dur.tv_sec = 0;
+            dur.tv_nsec = 5000000;
+        }
+
+        nanosleep(&dur, NULL);
+    }
+
+    return rc;
+}
+
+#endif
