Mercurial > hg > orthanc
comparison OrthancFramework/Sources/SystemToolbox.cpp @ 4552:beb8ba8a0b12 db-changes
fix build on freebsd
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 03 Mar 2021 13:44:01 +0100 |
parents | 8a7523da6a9b |
children | 7053502fbf97 |
comparison
equal
deleted
inserted
replaced
4551:350a22c094f2 | 4552:beb8ba8a0b12 |
---|---|
41 | 41 |
42 | 42 |
43 #if defined(__APPLE__) && defined(__MACH__) | 43 #if defined(__APPLE__) && defined(__MACH__) |
44 # include <limits.h> // PATH_MAX | 44 # include <limits.h> // PATH_MAX |
45 # include <mach-o/dyld.h> // _NSGetExecutablePath | 45 # include <mach-o/dyld.h> // _NSGetExecutablePath |
46 #endif | |
47 | |
48 | |
49 #if (defined(__APPLE__) && defined(__MACH__)) || defined(__FreeBSD_kernel__) || defined(__FreeBSD__) | |
46 # include <net/if_dl.h> // For GetMacAddresses() | 50 # include <net/if_dl.h> // For GetMacAddresses() |
47 # include <net/if_types.h> // For GetMacAddresses() | 51 # include <net/if_types.h> // For GetMacAddresses() |
48 # include <sys/sysctl.h> // For GetMacAddresses() | 52 # include <sys/sysctl.h> // For GetMacAddresses() |
49 #endif | 53 #endif |
50 | 54 |
1076 { | 1080 { |
1077 NetworkInterfaces interfaces; | 1081 NetworkInterfaces interfaces; |
1078 | 1082 |
1079 while (!interfaces.IsDone()) | 1083 while (!interfaces.IsDone()) |
1080 { | 1084 { |
1081 #if defined(__APPLE__) && defined(__MACH__) | 1085 #if (defined(__APPLE__) && defined(__MACH__)) || defined(__FreeBSD_kernel__) || defined(__FreeBSD__) |
1082 int mib[6]; | 1086 int mib[6]; |
1083 mib[0] = CTL_NET; | 1087 mib[0] = CTL_NET; |
1084 mib[1] = AF_ROUTE; | 1088 mib[1] = AF_ROUTE; |
1085 mib[2] = 0; | 1089 mib[2] = 0; |
1086 mib[3] = AF_LINK; | 1090 mib[3] = AF_LINK; |