diff --git a/src/Prep/Photo/wgs84offset.cxx b/src/Prep/Photo/wgs84offset.cxx
index 884e9f0d..aba2d8cd 100644
--- a/src/Prep/Photo/wgs84offset.cxx
+++ b/src/Prep/Photo/wgs84offset.cxx
@@ -1,5 +1,6 @@
 // calc wgs84 offset given starting lon/lat/alt, radial and distance
 
+#include <stdio.h>
 #include <stdlib.h>
 
 #include <simgear/math/sg_geodesy.hxx>