diff --git a/modules/lua/libs/input.c b/modules/lua/libs/input.c
index ad8813a61d2fb3a74e9ab7480c2366be1013ef96..c011f1d95f8bc40d82ea3dcc482c262dd34c8b20 100644
--- a/modules/lua/libs/input.c
+++ b/modules/lua/libs/input.c
@@ -35,7 +35,6 @@
 #include <vlc_es.h>
 #include <vlc_meta.h>
 #include <vlc_url.h>
-#include <vlc_playlist_legacy.h>
 #include <vlc_playlist.h>
 #include <vlc_player.h>
 
diff --git a/modules/lua/libs/sd.c b/modules/lua/libs/sd.c
index d0dc85d6c25bd8a22a01c34523efb88a2f8dab0f..7f6c085fb3ee40b104e0bd8c3b437d3feba0732f 100644
--- a/modules/lua/libs/sd.c
+++ b/modules/lua/libs/sd.c
@@ -36,7 +36,6 @@
 #include <math.h>
 #include <vlc_common.h>
 #include <vlc_services_discovery.h>
-#include <vlc_playlist_legacy.h>
 #include <vlc_charset.h>
 #include <vlc_md5.h>