diff --git a/libavcodec/mpegaudio.c b/libavcodec/mpegaudio.c
index 2e5e28a18710fcb18db8cb05f6477fe5ce001463..aa93442d57124fe981e528a3b38460925e158cc4 100644
--- a/libavcodec/mpegaudio.c
+++ b/libavcodec/mpegaudio.c
@@ -785,7 +785,6 @@ static int MPA_encode_close(AVCodecContext *avctx)
     return 0;
 }
 
-#ifdef CONFIG_MP2_ENCODER
 AVCodec mp2_encoder = {
     "mp2",
     CODEC_TYPE_AUDIO,
@@ -796,6 +795,5 @@ AVCodec mp2_encoder = {
     MPA_encode_close,
     NULL,
 };
-#endif // CONFIG_MP2_ENCODER
 
 #undef FIX