|
发表于 2008-3-25 17:01:54
|
显示全部楼层
FreeBSD上面编译不通过,我用的是myget-0.1.2
这个东东在FreeBSD上不能编译,我改了些许代码,可以下载http的东西,不过ftp总是报"Can not get the info of the file",没时间弄它了。楼主fix一下吧。
以下附上我的FreeBSD patch:
Only in myget-0.1.2.my/: Makefile
Only in myget-0.1.2.my/: config.h
Only in myget-0.1.2.my/: config.log
Only in myget-0.1.2.my/: config.status
Only in myget-0.1.2.my/src: .deps
Only in myget-0.1.2.my/src: Makefile
diff -ur myget-0.1.2/src/block.h myget-0.1.2.my/src/block.h
--- myget-0.1.2/src/block.h Mon Sep 12 11:56:32 2005
+++ myget-0.1.2.my/src/block.h Tue Mar 25 16:16:40 2008
@@ -22,6 +22,7 @@
#define _BLOCK_H
#include "advio.h"
+#include <pthread.h>
enum ThreadState
{
diff -ur myget-0.1.2/src/downloader.h myget-0.1.2.my/src/downloader.h
--- myget-0.1.2/src/downloader.h Mon Sep 12 11:56:32 2005
+++ myget-0.1.2.my/src/downloader.h Tue Mar 25 16:17:35 2008
@@ -22,6 +22,8 @@
#define _DOWNLOADER_H
#include <iostream>
+#include <sys/types.h>
+#include <sys/stat.h>
#include "plugin.h"
#include "task.h"
diff -ur myget-0.1.2/src/tcp.cpp myget-0.1.2.my/src/tcp.cpp
--- myget-0.1.2/src/tcp.cpp Wed Sep 21 09:58:45 2005
+++ myget-0.1.2.my/src/tcp.cpp Tue Mar 25 16:31:24 2008
@@ -122,8 +122,8 @@
char serv[12];
int n;
struct addrinfo hints;
-
- freeaddrinfo(addr);
+
+ if (addr != NULL) freeaddrinfo(addr);
if(snprintf(serv, 12, "%d", port) < 0) return -1;
bzero(&hints, sizeof(struct addrinfo));
diff -ur myget-0.1.2/src/tcp.h myget-0.1.2.my/src/tcp.h
--- myget-0.1.2/src/tcp.h Mon Sep 12 11:56:32 2005
+++ myget-0.1.2.my/src/tcp.h Tue Mar 25 16:15:39 2008
@@ -27,8 +27,8 @@
#include <sys/socket.h>
#include <netdb.h>
#include <unistd.h>
-#include <netinet/ip.h>
-
+#include <netinet/in.h>
+#define IPTOS_THROUGHPUT 0x08
#include "advio.h"
/***
* store the tcp socket address information
Only in myget-0.1.2.my/: stamp-h1 |
|