VirtualBox

Changeset 48401 in vbox


Ignore:
Timestamp:
Sep 10, 2013 11:34:05 AM (11 years ago)
Author:
vboxsync
Message:

lwip-nat: DHCP using system wide definition INET_ADDSTRLEN, on Windows we redefine it to BSD/Posix style.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/NetworkServices/DHCP/VBoxNetDHCP.cpp

    r48397 r48401  
    6767# include <Windows.h>
    6868# include <stdlib.h>
     69# ifdef INET_ADDRSTRLEN
     70/* On Windows INET_ADDRSTRLEN defined as 22 Ws2ipdef.h, because it include port number */
     71#  undef INET_ADDRSTRLEN
     72# endif
     73# define INET_ADDRSTRLEN 16
     74#else
     75# include <netinet/in.h>
    6976#endif
    7077
    71 #ifndef INET4_ADDRLEN
    72 # define INET4_ADDRLEN 17
    73 #endif
    7478
    7579#include "Config.h"
     
    406410
    407411                if (   pszTerm
    408                        && (pszTerm - pszLo2Off) < 16)
     412                       && (pszTerm - pszLo2Off) <= INET_ADDRSTRLEN)
    409413                {
    410414               
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette