compat BUGFIX pthread_rwlock feature macro
diff --git a/src/session_p.h b/src/session_p.h
index aaa6cbc..ed1c195 100644
--- a/src/session_p.h
+++ b/src/session_p.h
@@ -5,7 +5,7 @@
  * @brief libnetconf2 session manipulation
  *
  * @copyright
- * Copyright (c) 2017 - 2021 CESNET, z.s.p.o.
+ * Copyright (c) 2017 - 2023 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.
@@ -17,6 +17,8 @@
 #ifndef NC_SESSION_PRIVATE_H_
 #define NC_SESSION_PRIVATE_H_
 
+#define _GNU_SOURCE
+
 #include <pthread.h>
 #include <stdint.h>
 #include <sys/stat.h>