aboutsummaryrefslogtreecommitdiff
path: root/tools/darwin/depends/afpfs-ng
diff options
context:
space:
mode:
authorMemphiz <memphis@machzwo.de>2011-09-04 19:47:58 +0200
committerMemphiz <memphis@machzwo.de>2011-09-04 19:51:46 +0200
commited57291ee2abd925dcb17a6a99d808e4b5ca96a6 (patch)
tree11a243918ae93ad143a5248022bab8dd597bbc1d /tools/darwin/depends/afpfs-ng
parent54307c736b88428b6e4222081cd6e1b8701442c3 (diff)
[fix] - usage of errno
Diffstat (limited to 'tools/darwin/depends/afpfs-ng')
-rw-r--r--tools/darwin/depends/afpfs-ng/10-fix-errno.patch23
-rw-r--r--tools/darwin/depends/afpfs-ng/Makefile1
2 files changed, 24 insertions, 0 deletions
diff --git a/tools/darwin/depends/afpfs-ng/10-fix-errno.patch b/tools/darwin/depends/afpfs-ng/10-fix-errno.patch
new file mode 100644
index 0000000000..0c69415b55
--- /dev/null
+++ b/tools/darwin/depends/afpfs-ng/10-fix-errno.patch
@@ -0,0 +1,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 "afp_protocol.h"
+ #include "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");
diff --git a/tools/darwin/depends/afpfs-ng/Makefile b/tools/darwin/depends/afpfs-ng/Makefile
index 2088194535..58a4ffb014 100644
--- a/tools/darwin/depends/afpfs-ng/Makefile
+++ b/tools/darwin/depends/afpfs-ng/Makefile
@@ -31,6 +31,7 @@ $(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE)
cd $(SOURCE); patch -p1 <../07-boxee4.patch
cd $(SOURCE); patch -p1 <../08-boxee5.patch
cd $(SOURCE); patch -p1 <../09-boxee6.patch
+ cd $(SOURCE); patch -p1 <../10-fix-errno.patch
cd $(SOURCE); autoreconf -vif
cd $(SOURCE); $(CONFIGURE)