Fix deprecated asio usage

And enable BOOST_ASIO_NO_DEPRECATED

Change-Id: I83612501948e8c1c4a0df735aafc80e26af7f3cb
Signed-off-by: Ed Tanous <ed@tanous.net>
diff --git a/meson.build b/meson.build
index f682ca4..8b2f7a5 100644
--- a/meson.build
+++ b/meson.build
@@ -29,6 +29,13 @@
   boost  = declare_dependency(include_directories : boost_inc)
   boost = boost.as_system('system')
 endif
+add_project_arguments(
+    [
+        '-DBOOST_ASIO_DISABLE_THREADS',
+        '-DBOOST_ASIO_NO_DEPRECATED',
+    ],
+    language: 'cpp',
+)
 
 if get_option('buildtype').startswith('debug')
     add_project_arguments('-DMAPPER_ENABLE_DEBUG', language : 'cpp')
diff --git a/src/main.cpp b/src/main.cpp
index ebaf1ab..e84abfd 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -640,7 +640,7 @@
 
     iface->initialize();
 
-    io.post([&]() {
+    boost::asio::post(io, [&]() {
         doListNames(io, interfaceMap, systemBus.get(), nameOwners,
                     associationMaps, server);
     });