diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2020-01-03 03:00:57 +0100 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2020-01-03 03:00:57 +0100 |
commit | 9083ea9ad5f6b72eccd94faffcd12ae287b93cce (patch) | |
tree | b1ed148a9e3f038c770fdc7037aff846b8bafe00 | |
parent | 004f330aedaad5739457322487cdab0323ba7af1 (diff) | |
download | psutil-9083ea9ad5f6b72eccd94faffcd12ae287b93cce.tar.gz |
move AF_INET6 def in global.h
-rw-r--r-- | psutil/arch/windows/global.h | 5 | ||||
-rw-r--r-- | psutil/arch/windows/net.c | 5 | ||||
-rw-r--r-- | psutil/arch/windows/socks.c | 4 |
3 files changed, 5 insertions, 9 deletions
diff --git a/psutil/arch/windows/global.h b/psutil/arch/windows/global.h index 18d9a640..2773f17a 100644 --- a/psutil/arch/windows/global.h +++ b/psutil/arch/windows/global.h @@ -11,6 +11,7 @@ extern int PSUTIL_WINVER; extern SYSTEM_INFO PSUTIL_SYSTEM_INFO; + #define PSUTIL_WINDOWS_VISTA 60 #define PSUTIL_WINDOWS_7 61 #define PSUTIL_WINDOWS_8 62 @@ -21,6 +22,10 @@ extern SYSTEM_INFO PSUTIL_SYSTEM_INFO; #define LO_T 1e-7 #define HI_T 429.4967296 +#ifndef AF_INET6 +#define AF_INET6 23 +#endif + int psutil_load_globals(); PVOID psutil_GetProcAddress(LPCSTR libname, LPCSTR procname); PVOID psutil_GetProcAddressFromLib(LPCSTR libname, LPCSTR procname); diff --git a/psutil/arch/windows/net.c b/psutil/arch/windows/net.c index 565e844c..55008880 100644 --- a/psutil/arch/windows/net.c +++ b/psutil/arch/windows/net.c @@ -16,11 +16,6 @@ #include "global.h" -#ifndef AF_INET6 -#define AF_INET6 23 -#endif - - static PIP_ADAPTER_ADDRESSES psutil_get_nic_addresses() { // allocate a 15 KB buffer to start with diff --git a/psutil/arch/windows/socks.c b/psutil/arch/windows/socks.c index 5bf34151..854ca955 100644 --- a/psutil/arch/windows/socks.c +++ b/psutil/arch/windows/socks.c @@ -19,10 +19,6 @@ #define BYTESWAP_USHORT(x) ((((USHORT)(x) << 8) | ((USHORT)(x) >> 8)) & 0xffff) -#ifndef AF_INET6 -#define AF_INET6 23 -#endif - // https://msdn.microsoft.com/library/aa365928.aspx // TODO properly handle return code |