diff --git a/sim/common/dv-sockser.c b/sim/common/dv-sockser.c
index 7f1cf798e4b..99f280cd1a7 100644
--- a/sim/common/dv-sockser.c
+++ b/sim/common/dv-sockser.c
@@ -21,8 +21,6 @@ along with this program. If not, see . */
/* This must come before any other includes. */
#include "defs.h"
-#include "sim-main.h"
-
#include
#include
#include
@@ -46,6 +44,7 @@ along with this program. If not, see . */
#include
#endif
+#include "sim-main.h"
#include "sim-assert.h"
#include "sim-options.h"