diff --git a/src/rawtsinput.c b/src/rawtsinput.c
index fbdc74f2..38b52f03 100644
--- a/src/rawtsinput.c
+++ b/src/rawtsinput.c
@@ -16,6 +16,8 @@
* along with this program. If not, see .
*/
+#define _XOPEN_SOURCE 600 // for clock_nanosleep()
+
#include
#include
#include