diff --git a/helpers/make-mplayer b/helpers/make-mplayer
index 3d8e8eb5d2d43b1a919951dab8431213ea806115..fd036cae2574ca1b3b9a659d830e24c08d466a95 100644
--- a/helpers/make-mplayer
+++ b/helpers/make-mplayer
@@ -32,6 +32,9 @@ sed -i 's/\(--disable-arts \\\)/\1\n\t--disable-qtx \\/' debian/rules
 sed -i 's/\(--disable-arts \\\)/\1\n\t--disable-xanim \\/' debian/rules 
 sed -i 's/\(--disable-arts \\\)/\1\n\t--disable-real \\/' debian/rules 
 
+# fix https://trac.mplayerhq.hu/ticket/2343
+sed -i 's/.*\#include.*/\#define _GNU_SOURCE\n\n&/' cpudetect.c
+
 changelog "Removed references to non-free stuff"
 
 compile