aboutsummaryrefslogtreecommitdiff
path: root/tools/android/depends/afpfs-ng/10-fix-errno.patch
blob: ff7ce44bdb6b4bd172be329158131e4f804c80eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--- afpfs-ng-0.8.1/lib/afp.c	2011-09-04 19:42:42.000000000 +0200
+++ afpfs-ng-0.8.1/lib/afp.c	2011-09-04 19:39:44.000000000 +0200
@@ -19,7 +19,6 @@
 #include <sys/time.h>
 #include <sys/types.h>
 #include <sys/socket.h>
-#include <errno.h>
 
 #include <afpfs-ng/afp_protocol.h>
 #include <afpfs-ng/libafpclient.h>
--- afpfs-ng-0.8.1/lib/afp_url.c	2011-09-04 19:42:42.000000000 +0200
+++ afpfs-ng-0.8.1/lib/afp_url.c	2011-09-04 19:40:27.000000000 +0200
@@ -21,7 +21,9 @@
 
 static int check_port(char * port) 
 {
-	long long ret = strtol(port,NULL,10);
+	long long ret = 0;
+	errno = 0;
+	ret = strtol(port,NULL,10);
 	if ((ret<0) || (ret>32767)) return -1;
 	if (errno) {
 		printf("port error\n");