summaryrefslogtreecommitdiff
path: root/libfetch
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2012-08-23 16:55:14 +0200
committerAndreas Baumann <abaumann@yahoo.com>2012-08-23 16:55:14 +0200
commita303ad9b057b7431e2e65e1044d01c3b86450fe7 (patch)
treecc1c5785495ccfb312bdfc0b8c2faf1b6e6813e1 /libfetch
parent271c652cddfab36ac1eba63e68b7e87de09b9da4 (diff)
downloadcrawler-a303ad9b057b7431e2e65e1044d01c3b86450fe7.tar.gz
crawler-a303ad9b057b7431e2e65e1044d01c3b86450fe7.tar.bz2
some porting of libfetch for FreeBSD
Diffstat (limited to 'libfetch')
-rw-r--r--libfetch/common.c2
-rw-r--r--libfetch/fetch.c2
-rw-r--r--libfetch/ftp.c8
-rw-r--r--libfetch/http.c4
4 files changed, 14 insertions, 2 deletions
diff --git a/libfetch/common.c b/libfetch/common.c
index 4809bbd..7c28237 100644
--- a/libfetch/common.c
+++ b/libfetch/common.c
@@ -59,7 +59,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-#ifdef LINUX
+#if defined LINUX || defined FREEBSD
#include <strings.h>
#endif
#include <unistd.h>
diff --git a/libfetch/fetch.c b/libfetch/fetch.c
index 940ce7f..d529a28 100644
--- a/libfetch/fetch.c
+++ b/libfetch/fetch.c
@@ -42,7 +42,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#ifdef LINUX
+#if defined LINUX || defined FREEBSD
#include <strings.h>
#endif
diff --git a/libfetch/ftp.c b/libfetch/ftp.c
index b5688f2..b8202f1 100644
--- a/libfetch/ftp.c
+++ b/libfetch/ftp.c
@@ -62,6 +62,11 @@
#define _GNU_SOURCE
#endif
+/* for vasprintf */
+#ifdef FREEBSD
+#define __BSD_VISIBLE 1
+#endif
+
#if HAVE_CONFIG_H
#include "config.h"
#endif
@@ -91,6 +96,9 @@
#endif
#include <stdlib.h>
#include <string.h>
+#if defined LINUX || defined FREEBSD
+#include <strings.h>
+#endif
#include <time.h>
#include <unistd.h>
diff --git a/libfetch/http.c b/libfetch/http.c
index 931d54e..6b48a47 100644
--- a/libfetch/http.c
+++ b/libfetch/http.c
@@ -68,6 +68,10 @@
#define _GNU_SOURCE
#endif
+#ifdef FREEBSD
+#define __BSD_VISIBLE 1
+#endif
+
#ifdef _WIN32_
/* Needed for gmtime_r on Interix */
#define _REENTRANT