libnetwork: Only build BeOS compatibility code if _BEOS_R5_COMPATIBLE_ is set.

This commit is contained in:
Augustin Cavalier
2024-08-29 15:30:08 -04:00
parent fc07afd4bc
commit e776c8dee5
2 changed files with 11 additions and 0 deletions
+5
View File
@@ -38,6 +38,8 @@ struct r5_sockaddr_in {
char sin_zero[4];
};
#ifdef _BEOS_R5_COMPATIBLE_
extern bool __gR5Compatibility;
extern addr_t __gNetworkStart;
extern addr_t __gNetworkEnd;
@@ -67,6 +69,9 @@ check_r5_compatibility()
return true;
#endif
}
#else
#define check_r5_compatibility() (false)
#endif
#endif // NET_R5_COMPATIBILITY_H
+6
View File
@@ -16,6 +16,9 @@
#include <string.h>
#ifdef _BEOS_R5_COMPATIBLE_
bool __gR5Compatibility = false;
addr_t __gNetworkStart;
addr_t __gNetworkEnd;
@@ -78,3 +81,6 @@ initialize_before(image_id our_image)
} while (enable == 0
&& get_next_image_info(B_CURRENT_TEAM, (int32*)&cookie, &info) == B_OK);
}
#endif