* common.din (sockatmark): Export.

* net.cc (sockatmark): New function.
	* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
This commit is contained in:
Corinna Vinschen
2015-01-20 18:23:20 +00:00
parent d63bec588e
commit d2264bce02
5 changed files with 27 additions and 3 deletions

View File

@ -1,7 +1,7 @@
/* net.cc: network-related routines.
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Red Hat, Inc.
2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Red Hat, Inc.
This file is part of Cygwin.
@ -987,6 +987,19 @@ cygwin_getsockopt (int fd, int level, int optname, void *optval,
return res;
}
/* POSIX.1-2001 */
extern "C" int
sockatmark (int fd)
{
int ret;
fhandler_socket *fh = get (fd);
if (fh && fh->ioctl (SIOCATMARK, &ret) != -1)
return ret;
return -1;
}
/* BSD */
extern "C" int
getpeereid (int fd, uid_t *euid, gid_t *egid)
{