diff --git a/libavcodec/mdct_tablegen.c b/libavcodec/mdct_tablegen.c
index f04502f181447d92206eb8e08c586034363b0c12..a6b13c345b7dcb630242d20e95823ae2eeda51fb 100644
--- a/libavcodec/mdct_tablegen.c
+++ b/libavcodec/mdct_tablegen.c
@@ -22,7 +22,6 @@
 
 #include <stdlib.h>
 #define CONFIG_HARDCODED_TABLES 0
-#define av_cold
 #define SINETABLE_CONST
 #define SINETABLE(size) \
     float ff_sine_##size[size]
diff --git a/libavcodec/mdct_tablegen.h b/libavcodec/mdct_tablegen.h
index af652e745731b90409535280ea5f1f69b924312c..1722c3b4d09f3a84ea8dbff2ae26d66bd5a13a6e 100644
--- a/libavcodec/mdct_tablegen.h
+++ b/libavcodec/mdct_tablegen.h
@@ -24,6 +24,7 @@
 // do not use libavutil/mathematics.h since this is compiled both
 // for the host and the target and config.h is only valid for the target
 #include <math.h>
+#include "../libavutil/attributes.h"
 
 #if !CONFIG_HARDCODED_TABLES
 SINETABLE(  32);
diff --git a/libavcodec/qdm2_tablegen.c b/libavcodec/qdm2_tablegen.c
index b311e7f4db4d2c878d2e3a124f59d1b6b3aea7e1..d23493c7418068ea6b78b198aa893e1501c72ff5 100644
--- a/libavcodec/qdm2_tablegen.c
+++ b/libavcodec/qdm2_tablegen.c
@@ -21,7 +21,6 @@
  */
 
 #include <stdlib.h>
-#define av_cold
 #define CONFIG_HARDCODED_TABLES 0
 #include "qdm2_tablegen.h"
 #include "tableprint.h"
diff --git a/libavcodec/qdm2_tablegen.h b/libavcodec/qdm2_tablegen.h
index 83d8c2d0955f655ad41711149714cb080f71f306..de9ff0c902923079591538fc8d6458a866d62671 100644
--- a/libavcodec/qdm2_tablegen.h
+++ b/libavcodec/qdm2_tablegen.h
@@ -25,6 +25,7 @@
 
 #include <stdint.h>
 #include <math.h>
+#include "../libavutil/attributes.h"
 
 #define SOFTCLIP_THRESHOLD 27600
 #define HARDCLIP_THRESHOLD 35716