diff --git a/libavformat/isom.h b/libavformat/isom.h
index fa73ad91bb6cde227b17d36e83e124bc996eb66b..85b876106ff5d9330f82b155e65d359d87f7d531 100644
--- a/libavformat/isom.h
+++ b/libavformat/isom.h
@@ -24,6 +24,9 @@
 #ifndef AVFORMAT_ISOM_H
 #define AVFORMAT_ISOM_H
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "libavutil/spherical.h"
 #include "libavutil/stereo3d.h"
 
diff --git a/libavutil/spherical.h b/libavutil/spherical.h
index 8ecaefd946db59bdd030af0055eb839276d6a6cb..0045eb974aef7e2480fe701c9a0051b09382588c 100644
--- a/libavutil/spherical.h
+++ b/libavutil/spherical.h
@@ -26,6 +26,9 @@
 #ifndef AVUTIL_SPHERICAL_H
 #define AVUTIL_SPHERICAL_H
 
+#include <stddef.h>
+#include <stdint.h>
+
 /**
  * @addtogroup lavu_video
  * @{