diff --git a/libavformat/udp.c b/libavformat/udp.c
index b906660e011bf628f6f581e7932d51f35153cb55..cb5f516fae73b3ae7187986733d2e852c09c0396 100644
--- a/libavformat/udp.c
+++ b/libavformat/udp.c
@@ -204,7 +204,7 @@ static int udp_ipv6_set_local(URLContext *h) {
     return -1;
 }
 
-#endif
+#endif /* CONFIG_IPV6 */
 
 
 /**
@@ -384,7 +384,7 @@ static int udp_open(URLContext *h, const char *uri, int flags)
                 goto fail;
         }
     }
-#endif
+#endif /* CONFIG_IPV6 */
 
     if (is_output) {
         /* limit the tx buf size to limit latency */