PageRenderTime 23ms CodeModel.GetById 18ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/packages/network/afpfs-ng/patches/afpfs-ng-0.8.1-10-fix-errno.patch

http://github.com/OpenELEC/OpenELEC.tv
Patch | 25 lines | 23 code | 2 blank | 0 comment | 0 complexity | e8412a19dfce620ade6a2d17d64c7de8 MD5 | raw file
 1diff -Naur afpfs-ng-0.8.1/lib/afp.c afpfs-ng-0.8.1.patch/lib/afp.c
 2--- afpfs-ng-0.8.1/lib/afp.c	2011-09-10 12:23:38.207025811 +0200
 3+++ afpfs-ng-0.8.1.patch/lib/afp.c	2011-09-10 12:30:20.305810381 +0200
 4@@ -19,7 +19,6 @@
 5 #include <sys/time.h>
 6 #include <sys/types.h>
 7 #include <sys/socket.h>
 8-#include <errno.h>
 9 
10 #include "afpfs-ng/afp_protocol.h"
11 #include "afpfs-ng/libafpclient.h"
12diff -Naur afpfs-ng-0.8.1/lib/afp_url.c afpfs-ng-0.8.1.patch/lib/afp_url.c
13--- afpfs-ng-0.8.1/lib/afp_url.c	2011-09-10 12:21:39.946437001 +0200
14+++ afpfs-ng-0.8.1.patch/lib/afp_url.c	2011-09-10 12:30:20.306810396 +0200
15@@ -21,7 +21,9 @@
16 
17 static int check_port(char * port) 
18 {
19-	long long ret = strtol(port,NULL,10);
20+	long long ret = 0;
21+	errno = 0;
22+	ret = strtol(port,NULL,10);
23 	if ((ret<0) || (ret>32767)) return -1;
24 	if (errno) {
25 		printf("port error\n");