In windows there is no clear way to distinguish between a socket fd and a file fd.
We use the function, describe_fd() mostly for debugging. For now, return a generic statement. Co-authored-by: Linda Sun <l...@vmware.com> Signed-off-by: Linda Sun <l...@vmware.com> Signed-off-by: Gurucharan Shetty <gshe...@nicira.com> --- lib/socket-util.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/socket-util.c b/lib/socket-util.c index b085007..3a8a1f7 100644 --- a/lib/socket-util.c +++ b/lib/socket-util.c @@ -1305,6 +1305,7 @@ describe_fd(int fd) struct stat s; ds_init(&string); +#ifndef _WIN32 if (fstat(fd, &s)) { ds_put_format(&string, "fstat failed (%s)", ovs_strerror(errno)); } else if (S_ISSOCK(s.st_mode)) { @@ -1324,6 +1325,9 @@ describe_fd(int fd) put_fd_filename(&string, fd); #endif } +#else + ds_put_format(&string,"file descriptor"); +#endif /* _WIN32 */ return ds_steal_cstr(&string); } -- 1.7.9.5 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev