fix Raspberry Pi build
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#include <mutex>
|
||||||
#include <phosg/Filesystem.hh>
|
#include <phosg/Filesystem.hh>
|
||||||
#include <phosg/JSON.hh>
|
#include <phosg/JSON.hh>
|
||||||
#include <phosg/Math.hh>
|
#include <phosg/Math.hh>
|
||||||
|
|||||||
@@ -68,10 +68,7 @@ map<string, uint32_t> get_local_addresses() {
|
|||||||
|
|
||||||
bool is_local_address(uint32_t addr) {
|
bool is_local_address(uint32_t addr) {
|
||||||
uint8_t net = (addr >> 24) & 0xFF;
|
uint8_t net = (addr >> 24) & 0xFF;
|
||||||
if ((net != 127) && (net != 172) && (net != 10) && (net != 192)) {
|
return ((net == 127) || (net == 172) || (net == 10) || (net == 192));
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool is_local_address(const sockaddr_storage& daddr) {
|
bool is_local_address(const sockaddr_storage& daddr) {
|
||||||
|
|||||||
Reference in New Issue
Block a user