]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common: hide asio header from common/error_code.h
authorCasey Bodley <cbodley@redhat.com>
Tue, 18 Apr 2023 15:06:50 +0000 (11:06 -0400)
committerCasey Bodley <cbodley@redhat.com>
Fri, 20 Oct 2023 13:18:30 +0000 (09:18 -0400)
this added a dependency on uring headers where it wasn't necessary.
pick_address.cc was relying on that for the IFF_UP define

Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/common/error_code.cc
src/common/error_code.h
src/common/pick_address.cc

index 60086c550aeb2f42127c551b6fe79ccfad11cafd..ed0e681b22bf806815c3402f6242f610f8ddb043 100644 (file)
@@ -15,6 +15,7 @@
 
 #include <exception>
 
+#include <boost/asio/error.hpp>
 #include "common/error_code.h"
 
 #pragma GCC diagnostic push
index 6bcd8cb1791cdca2aae79ef94639828581e26d03..e39122f8ce3115ddeee1df44725e710637780451 100644 (file)
@@ -18,8 +18,7 @@
 
 #include <netdb.h>
 
-#include <boost/system/error_code.hpp>
-#include <boost/asio.hpp>
+#include <boost/system.hpp>
 
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
index 2fd076808ac74b2b8737260c4b5c37cd3fa4bf7d..70a18c25dc3137d417e60b035b18979a4fd636d8 100644 (file)
 #include <bitset>
 #include <netdb.h>
 #include <netinet/in.h>
+#ifdef _WIN32
+#include <ws2ipdef.h>
+#else
+#include <arpa/inet.h> // inet_pton()
+#include <net/if.h> // IFF_UP
+#endif
 #include <string>
 #include <string.h>
 #include <vector>