diff --git a/libraries/lzma/C/Threads.h b/libraries/lzma/C/Threads.h
index 4028464..86b0687 100644
--- a/libraries/lzma/C/Threads.h
+++ b/libraries/lzma/C/Threads.h
@@ -4,6 +4,10 @@
 #ifndef ZIP7_INC_THREADS_H
 #define ZIP7_INC_THREADS_H

+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE /* Required for musl to expose cpu_set_t */
+#endif
+
 #ifdef _WIN32
 #include "7zWindows.h"
