diff --git a/daemon/src/sip/sdp.cpp b/daemon/src/sip/sdp.cpp
index f386128ed227bdbcd977cb31c049b642d1136939..4a97ab3ba15ad2b104e0daada74370eed66c7ddf 100644
--- a/daemon/src/sip/sdp.cpp
+++ b/daemon/src/sip/sdp.cpp
@@ -45,6 +45,8 @@
 #include "video/libav_utils.h"
 #endif
 
+#include <algorithm>
+
 using std::string;
 using std::map;
 using std::vector;
diff --git a/daemon/src/sip/sdp.h b/daemon/src/sip/sdp.h
index 048b0f873f0e5769d6c239df8c079d81626ad90a..08764f62582d386288d9260d2d81c9071fa517e1 100644
--- a/daemon/src/sip/sdp.h
+++ b/daemon/src/sip/sdp.h
@@ -32,6 +32,9 @@
 #ifndef SDP_H_
 #define SDP_H_
 
+#include "global.h"
+#include "noncopyable.h"
+
 #include <pjmedia/sdp.h>
 #include <pjmedia/sdp_neg.h>
 #include <pjsip/sip_transport.h>
@@ -40,13 +43,11 @@
 #include <pjmedia/errno.h>
 #include <pj/pool.h>
 #include <pj/assert.h>
+
 #include <vector>
 #include <string>
 #include <stdexcept>
 
-#include "global.h"
-#include "noncopyable.h"
-
 namespace sfl {
 class AudioCodec;
 }