From d9d404aecc0bc5df44b302f8e0e2316926ec81f4 Mon Sep 17 00:00:00 2001 From: Gurucharan Shetty Date: Wed, 12 Mar 2014 09:51:13 -0700 Subject: [PATCH] windows/net: Definition for IFNAMSIZ. Signed-off-by: Gurucharan Shetty Acked-by: Ben Pfaff --- include/windows/net/if.h | 24 ++++++++++++++++++++++++ lib/netdev-vport.h | 4 ++++ 2 files changed, 28 insertions(+) diff --git a/include/windows/net/if.h b/include/windows/net/if.h index e69de29bb..893ffe4d1 100644 --- a/include/windows/net/if.h +++ b/include/windows/net/if.h @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2014 Nicira, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __NET_IF_H +#define __NET_IF_H 1 + +#include + +#define IFNAMSIZ IF_NAMESIZE + +#endif /* net/if.h */ diff --git a/lib/netdev-vport.h b/lib/netdev-vport.h index eaeb3869a..833fee892 100644 --- a/lib/netdev-vport.h +++ b/lib/netdev-vport.h @@ -41,7 +41,11 @@ void netdev_vport_inc_tx(const struct netdev *, const char *netdev_vport_class_get_dpif_port(const struct netdev_class *); +#ifndef _WIN32 enum { NETDEV_VPORT_NAME_BUFSIZE = 16 }; +#else +enum { NETDEV_VPORT_NAME_BUFSIZE = 256 }; +#endif const char *netdev_vport_get_dpif_port(const struct netdev *, char namebuf[], size_t bufsize); char *netdev_vport_get_dpif_port_strdup(const struct netdev *); -- 2.47.0