shithub: lwext4

Download patch

ref: 0d2c2b5509e8489b94dfe782eb1bf455fa86a493
parent: 096ac0cfd231fdd540bd35072592730634fab218
author: gkostka <kostka.grzegorz@gmail.com>
date: Sun Apr 6 13:10:06 EDT 2014

SO_REUSEADDR option for server socket.
Fixed client path in fs_test.mk.
Disabled internal errno definitions. 

--- a/fs_test.mk
+++ b/fs_test.mk
@@ -1,6 +1,6 @@
 
 
-LWEXT4_CLIENT = @build_generic\\lwext4_client
+LWEXT4_CLIENT = @build_generic/lwext4_client
 
 TEST_DIR = /test
 
--- a/fs_test/lwext4_server.c
+++ b/fs_test/lwext4_server.c
@@ -234,6 +234,12 @@
         exit(-1);
     }
 
+    int yes = 1;
+    if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (void *)&yes, sizeof(int))) {
+        printf("setsockopt() error: %s\n", strerror(errno));
+        exit(-1);
+    }
+
     serv_addr.sin_family = AF_INET;
     serv_addr.sin_addr.s_addr = htonl(INADDR_ANY);
     serv_addr.sin_port = htons(connection_port);
--- a/lwext4/ext4_config.h
+++ b/lwext4/ext4_config.h
@@ -56,7 +56,7 @@
 
 /**@brief   Include error codes from ext4_errno or sandard library.*/
 #ifndef CONFIG_HAVE_OWN_ERRNO
-#define CONFIG_HAVE_OWN_ERRNO       1
+#define CONFIG_HAVE_OWN_ERRNO       0
 #endif