Port build error related to ASIO and netdb.h

Related: Porting issues R1B4 vs nightly - #12 by madmax

This worked, but then there is another error still around, maybe asio is too new for this?

diff --git a/src/network/network.h b/src/network/network.h
index 3d540d6..fc01b90 100644
--- a/src/network/network.h
+++ b/src/network/network.h
@@ -16,22 +16,18 @@
  *
  */
 
+#ifdef __HAIKU__
+#define _DEFAULT_SOURCE
+#define _BSD_SOURCE
+#endif
+
 #ifndef WL_NETWORK_NETWORK_H
 #define WL_NETWORK_NETWORK_H
 
 
 
 #include <functional>
-
-#ifdef __HAIKU__
-#undef _BSD_SOURCE
-#undef _DEFAULT_SOURCE
-#endif
 #include <asio.hpp>
-#ifdef __HAIKU__
-#define _DEFAULT_SOURCE
-#define _BSD_SOURCE
-#endif
 
 #include "base/string.h"
 #include "base/wexception.h"

...
Error now:

/sources/widelands-1.1/src/network/bufferedconnection.h:316:15: error: 'io_service' in namespace 'asio' does not name a type; did you mean 'use_service'?
  316 |         asio::io_service io_service_;
      |               ^~~~~~~~~~
      |               use_service
/sources/widelands-1.1/src/network/bufferedconnection.h:316:15: error: 'io_service' in namespace 'asio' does not name a type; did you mean 'use_service'?
  316 |         asio::io_service io_service_;
      |               ^~~~~~~~~~
      |               use_service
make[2]: *** [src/ui_fsmenu/CMakeFiles/ui_fsmenu.dir/build.make:359: src/ui_fsmenu/CMakeFiles/ui_fsmenu.dir/login_box.cc.o] Error 1
make[2]: *** [src/ui_fsmenu/CMakeFiles/ui_fsmenu.dir/build.make:317: src/ui_fsmenu/CMakeFiles/ui_fsmenu.dir/launch_mpg.cc.o] Error 1
/sources/widelands-1.1/src/network/bufferedconnection.h:316:15: error: 'io_service' in namespace 'asio' does not name a type; did you mean 'use_service'?
  316 |         asio::io_service io_service_;
      |               ^~~~~~~~~~
      |               use_service
In file included from /sources/widelands-1.1/src/ui_fsmenu/netsetup_lan.h:25,
                 from /sources/widelands-1.1/src/ui_fsmenu/main.cc:49:
/sources/widelands-1.1/src/network/network_lan_promotion.h:136:15: error: 'io_service' in namespace 'asio' does not name a type; did you mean 'use_service'?
  136 |         asio::io_service io_service;
      |               ^~~~~~~~~~
      |               use_service
```

Stupid markdown :confused:

EDIT2: replacing use_service with io_context works (this has been replaced in asio for quite some time, however there are again new errors popping up …. not sure how uptoday the version of widelands is, maybe a newer version has less issues?