Index: uspace/app/netecho/print_error.c
===================================================================
--- uspace/app/netecho/print_error.c	(revision 29fa68bbd80a0d830177316309af3cdd6a2b3044)
+++ uspace/app/netecho/print_error.c	(revision e98b1d582137f7a2c521f6e31e0cee410b5acb65)
@@ -36,7 +36,7 @@
 
 #include <stdio.h>
+#include <errno.h>
 
 #include <icmp_codes.h>
-#include <socket_errno.h>
 
 #include "print_error.h"
Index: uspace/app/ping/ping.c
===================================================================
--- uspace/app/ping/ping.c	(revision 29fa68bbd80a0d830177316309af3cdd6a2b3044)
+++ uspace/app/ping/ping.c	(revision e98b1d582137f7a2c521f6e31e0cee410b5acb65)
@@ -42,4 +42,5 @@
 #include <ipc/services.h>
 #include <str_error.h>
+#include <errno.h>
 #include <arg_parse.h>
 
@@ -49,5 +50,4 @@
 #include <inet.h>
 #include <ip_codes.h>
-#include <socket_errno.h>
 #include <socket_parse.h>
 
Index: uspace/lib/c/include/errno.h
===================================================================
--- uspace/lib/c/include/errno.h	(revision 29fa68bbd80a0d830177316309af3cdd6a2b3044)
+++ uspace/lib/c/include/errno.h	(revision e98b1d582137f7a2c521f6e31e0cee410b5acb65)
@@ -56,4 +56,40 @@
 #define EMLINK        (-266)
 
+/** An API function is called while another blocking function is in progress. */
+#define EINPROGRESS	(-10036)
+
+/** The socket identifier is not valid. */
+#define ENOTSOCK	(-10038)
+
+/** The destination address required. */
+#define EDESTADDRREQ	(-10039)
+
+/** Protocol is not supported.  */
+#define EPROTONOSUPPORT	(-10043)
+
+/** Socket type is not supported. */
+#define ESOCKTNOSUPPORT	(-10044)
+
+/** Protocol family is not supported. */
+#define EPFNOSUPPORT	(-10046)
+
+/** Address family is not supported. */
+#define EAFNOSUPPORT	(-10047)
+
+/** Address is already in use. */
+#define EADDRINUSE	(-10048)
+
+/** The socket is not connected or bound. */
+#define ENOTCONN	(-10057)
+
+/** The requested operation was not performed.
+ *  Try again later.
+ */
+#define TRY_AGAIN	(-11002)
+
+/** No data.
+ */
+#define NO_DATA		(-11004)
+
 #endif
 
Index: uspace/lib/net/il/ip_client.c
===================================================================
--- uspace/lib/net/il/ip_client.c	(revision 29fa68bbd80a0d830177316309af3cdd6a2b3044)
+++ uspace/lib/net/il/ip_client.c	(revision e98b1d582137f7a2c521f6e31e0cee410b5acb65)
@@ -40,5 +40,4 @@
 
 #include <ip_client.h>
-#include <socket_errno.h>
 #include <packet/packet.h>
 #include <packet/packet_client.h>
Index: uspace/lib/net/tl/tl_common.c
===================================================================
--- uspace/lib/net/tl/tl_common.c	(revision 29fa68bbd80a0d830177316309af3cdd6a2b3044)
+++ uspace/lib/net/tl/tl_common.c	(revision e98b1d582137f7a2c521f6e31e0cee410b5acb65)
@@ -38,4 +38,5 @@
 #include <async.h>
 #include <ipc/services.h>
+#include <errno.h>
 
 #include <net_err.h>
@@ -51,5 +52,4 @@
 #include <ip_remote.h>
 #include <socket_codes.h>
-#include <socket_errno.h>
 #include <ip_interface.h>
 #include <tl_interface.h>
Index: uspace/lib/socket/generic/socket_client.c
===================================================================
--- uspace/lib/socket/generic/socket_client.c	(revision 29fa68bbd80a0d830177316309af3cdd6a2b3044)
+++ uspace/lib/socket/generic/socket_client.c	(revision e98b1d582137f7a2c521f6e31e0cee410b5acb65)
@@ -42,4 +42,5 @@
 #include <stdint.h>
 #include <stdlib.h>
+#include <errno.h>
 
 #include <ipc/services.h>
@@ -49,5 +50,4 @@
 #include <in.h>
 #include <socket.h>
-#include <socket_errno.h>
 #include <adt/dynamic_fifo.h>
 #include <adt/int_map.h>
Index: uspace/lib/socket/generic/socket_core.c
===================================================================
--- uspace/lib/socket/generic/socket_core.c	(revision 29fa68bbd80a0d830177316309af3cdd6a2b3044)
+++ uspace/lib/socket/generic/socket_core.c	(revision e98b1d582137f7a2c521f6e31e0cee410b5acb65)
@@ -37,4 +37,5 @@
 #include <stdint.h>
 #include <stdlib.h>
+#include <errno.h>
 
 #include <net_err.h>
@@ -42,5 +43,4 @@
 #include <inet.h>
 #include <socket_codes.h>
-#include <socket_errno.h>
 #include <adt/dynamic_fifo.h>
 #include <adt/int_map.h>
Index: uspace/lib/socket/include/socket.h
===================================================================
--- uspace/lib/socket/include/socket.h	(revision 29fa68bbd80a0d830177316309af3cdd6a2b3044)
+++ uspace/lib/socket/include/socket.h	(revision e98b1d582137f7a2c521f6e31e0cee410b5acb65)
@@ -45,5 +45,5 @@
 #include <inet.h>
 #include <socket_codes.h>
-#include <socket_errno.h>
+#include <errno.h>
 
 /** @name Socket application programming interface
Index: pace/lib/socket/include/socket_errno.h
===================================================================
--- uspace/lib/socket/include/socket_errno.h	(revision 29fa68bbd80a0d830177316309af3cdd6a2b3044)
+++ 	(revision )
@@ -1,136 +1,0 @@
-/*
- * Copyright (c) 2009 Lukas Mejdrech
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup net
- *  @{
- */
-
-/** @file
- *  Socket error codes.
- *  Based on BSD.
- */
-
-#ifndef __NET_SOCKET_ERR_H__
-#define __NET_SOCKET_ERR_H__
-
-#include <errno.h>
-
-/** @name Socket error codes definitions
- */
-/*@{*/
-
-////#define EINTR			(-10004)
-////#define EBADF			(-10009)
-//#define EACCES			(-10013)
-//#define EFAULT			(-10014)
-////#define EINVAL			(-10022)
-////#define EMFILE			(-10024)
-//#define EWOULDBLOCK		(-10035)
-
-/** An API function is called while another blocking function is in progress.
- */
-#define EINPROGRESS		(-10036)
-
-//#define EALREADY		(-10037)
-
-/** The socket identifier is not valid.
- */
-#define ENOTSOCK		(-10038)
-
-/** The destination address required.
- */
-#define EDESTADDRREQ	(-10039)
-
-//#define EMSGSIZE		(-10040)
-//#define EPROTOTYPE		(-10041)
-//#define ENOPROTOOPT		(-10042)
-
-/** Protocol is not supported.
- */
-#define EPROTONOSUPPORT	(-10043)
-
-/** Socket type is not supported.
- */
-#define ESOCKTNOSUPPORT	(-10044)
-
-//#define EOPNOTSUPP		(-10045)
-
-/** Protocol family is not supported.
- */
-#define EPFNOSUPPORT	(-10046)
-
-/** Address family is not supported.
- */
-#define EAFNOSUPPORT	(-10047)
-
-/** Address is already in use.
- */
-#define EADDRINUSE		(-10048)
-
-//#define EADDRNOTAVAIL	(-10049)
-/* May be reported at any time if the implementation detects an underlying failure.
- */
-//#define ENETDOWN		(-10050)
-//#define ENETUNREACH		(-10051)
-//#define ENETRESET		(-10052)
-//#define ECONNABORTED	(-10053)
-//#define ECONNRESET		(-10054)
-//#define ENOBUFS			(-10055)
-//#define EISCONN			(-10056)
-
-/** The socket is not connected or bound.
- */
-#define ENOTCONN		(-10057)
-
-//#define ESHUTDOWN		(-10058)
-//#define ETOOMANYREFS	(-10059)
-//#define ETIMEDOUT		(-10060)
-//#define ECONNREFUSED	(-10061)
-//#define ELOOP			(-10062)
-////#define ENAMETOOLONG	(-10063)
-//#define EHOSTDOWN		(-10064)
-//#define EHOSTUNREACH	(-10065)
-//#define HOST_NOT_FOUND	(-11001)
-
-/** The requested operation was not performed.
- *  Try again later.
- */
-#define TRY_AGAIN		(-11002)
-
-//#define NO_RECOVERY		(-11003)
-
-/** No data.
- */
-#define NO_DATA			(-11004)
-
-/*@}*/
-
-#endif
-
-/** @}
- */
Index: uspace/srv/net/il/ip/ip.c
===================================================================
--- uspace/srv/net/il/ip/ip.c	(revision 29fa68bbd80a0d830177316309af3cdd6a2b3044)
+++ uspace/srv/net/il/ip/ip.c	(revision e98b1d582137f7a2c521f6e31e0cee410b5acb65)
@@ -65,5 +65,4 @@
 #include <tl_interface.h>
 #include <socket_codes.h>
-#include <socket_errno.h>
 #include <adt/measured_strings.h>
 #include <adt/module_map.h>
Index: uspace/srv/net/tl/icmp/icmp.c
===================================================================
--- uspace/srv/net/tl/icmp/icmp.c	(revision 29fa68bbd80a0d830177316309af3cdd6a2b3044)
+++ uspace/srv/net/tl/icmp/icmp.c	(revision e98b1d582137f7a2c521f6e31e0cee410b5acb65)
@@ -46,4 +46,5 @@
 #include <sys/time.h>
 #include <sys/types.h>
+#include <errno.h>
 
 #include <net_err.h>
@@ -66,5 +67,4 @@
 #include <net_interface.h>
 #include <socket_codes.h>
-#include <socket_errno.h>
 #include <tl_messages.h>
 #include <tl_interface.h>
Index: uspace/srv/net/tl/tcp/tcp.c
===================================================================
--- uspace/srv/net/tl/tcp/tcp.c	(revision 29fa68bbd80a0d830177316309af3cdd6a2b3044)
+++ uspace/srv/net/tl/tcp/tcp.c	(revision e98b1d582137f7a2c521f6e31e0cee410b5acb65)
@@ -42,4 +42,5 @@
 //TODO remove stdio
 #include <stdio.h>
+#include <errno.h>
 
 #include <ipc/ipc.h>
@@ -63,5 +64,4 @@
 #include <net_interface.h>
 #include <socket_codes.h>
-#include <socket_errno.h>
 #include <tcp_codes.h>
 #include <socket_core.h>
Index: uspace/srv/net/tl/udp/udp.c
===================================================================
--- uspace/srv/net/tl/udp/udp.c	(revision 29fa68bbd80a0d830177316309af3cdd6a2b3044)
+++ uspace/srv/net/tl/udp/udp.c	(revision e98b1d582137f7a2c521f6e31e0cee410b5acb65)
@@ -42,4 +42,5 @@
 #include <ipc/ipc.h>
 #include <ipc/services.h>
+#include <errno.h>
 
 #include <net_err.h>
@@ -60,5 +61,4 @@
 #include <net_interface.h>
 #include <socket_codes.h>
-#include <socket_errno.h>
 #include <socket_core.h>
 #include <socket_messages.h>
