summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--winsup/cygwin/devices.cc3
-rw-r--r--winsup/cygwin/devices.h7
-rw-r--r--winsup/cygwin/devices.in3
-rw-r--r--winsup/cygwin/path.cc2
4 files changed, 12 insertions, 3 deletions
diff --git a/winsup/cygwin/devices.cc b/winsup/cygwin/devices.cc
index 2b65108a3..8ba199dd9 100644
--- a/winsup/cygwin/devices.cc
+++ b/winsup/cygwin/devices.cc
@@ -120,6 +120,9 @@ const _device dev_piper_storage =
const _device dev_pipew_storage =
{"", {FH_PIPEW}, "", exists_internal};
+const _device dev_socket_storage =
+ {"", {FH_SOCKET}, "", exists_internal};
+
const _device dev_af_inet_storage =
{"", {FH_INET}, "", exists_internal};
diff --git a/winsup/cygwin/devices.h b/winsup/cygwin/devices.h
index 9924bad01..87e033040 100644
--- a/winsup/cygwin/devices.h
+++ b/winsup/cygwin/devices.h
@@ -242,6 +242,7 @@ enum fh_devices
FH_OSS_DSP = FHDEV (DEV_SOUND_MAJOR, 3),
DEV_SOCK_MAJOR = 30,
+ FH_SOCKET = FHDEV (DEV_SOCK_MAJOR, 0),
FH_INET = FHDEV (DEV_SOCK_MAJOR, 36),
FH_LOCAL = FHDEV (DEV_SOCK_MAJOR, 120),
@@ -390,10 +391,12 @@ extern const _device *ptmx_dev;
extern const _device *ptys_dev;
extern const _device *urandom_dev;
-extern const _device dev_af_local_storage;
-#define af_local_dev ((device *) &dev_af_local_storage)
+extern const _device dev_socket_storage;
+#define socket_dev ((device *) &dev_socket_storage)
extern const _device dev_af_inet_storage;
#define af_inet_dev ((device *) &dev_af_inet_storage)
+extern const _device dev_af_local_storage;
+#define af_local_dev ((device *) &dev_af_local_storage)
extern const _device dev_piper_storage;
#define piper_dev ((device *) &dev_piper_storage)
diff --git a/winsup/cygwin/devices.in b/winsup/cygwin/devices.in
index 47d127cb3..c0108b817 100644
--- a/winsup/cygwin/devices.in
+++ b/winsup/cygwin/devices.in
@@ -116,6 +116,9 @@ const _device dev_piper_storage =
const _device dev_pipew_storage =
{"", {FH_PIPEW}, "", exists_internal};
+const _device dev_socket_storage =
+ {"", {FH_SOCKET}, "", exists_internal};
+
const _device dev_af_inet_storage =
{"", {FH_INET}, "", exists_internal};
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 2bf84abbe..da4598931 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -864,7 +864,7 @@ path_conv::check (const char *src, unsigned opt,
if (component == 0)
{
fileattr = 0;
- dev.parse (FH_INET);
+ dev.parse (FH_SOCKET);
}
break;
case virt_fsdir: