From e421789386d4f621ddbb1a107278f7843b3042c8 Mon Sep 17 00:00:00 2001 From: Jan Lehnardt Date: Tue, 15 Jun 2010 16:27:22 +0000 Subject: Fix warnings on Linux builds. Patch by Paul Davis. Closes COUCHDB-775 git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@954950 13f79535-47bb-0310-9956-ffa450edef68 --- src/couchdb/priv/Makefile.am | 2 +- src/couchdb/priv/couch_js/http.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/couchdb/priv/Makefile.am b/src/couchdb/priv/Makefile.am index 5b76f8cd..b36d828d 100644 --- a/src/couchdb/priv/Makefile.am +++ b/src/couchdb/priv/Makefile.am @@ -47,7 +47,7 @@ COUCHJS_SRCS = \ locallibbin_PROGRAMS = couchjs couchjs_SOURCES = $(COUCHJS_SRCS) couchjs_LDFLAGS = $(CURL_LDFLAGS) -couchjs_CFLAGS = $(CURL_CFLAGS) +couchjs_CFLAGS = -D_BSD_SOURCE $(CURL_CFLAGS) couchjs_LDADD = $(CURL_LDFLAGS) @JSLIB@ couchpriv_DATA = stat_descriptions.cfg diff --git a/src/couchdb/priv/couch_js/http.c b/src/couchdb/priv/couch_js/http.c index 998c2439..6c2a8a82 100644 --- a/src/couchdb/priv/couch_js/http.c +++ b/src/couchdb/priv/couch_js/http.c @@ -10,6 +10,7 @@ // License for the specific language governing permissions and limitations under // the License. +#include #include #include #include @@ -403,7 +404,8 @@ go(JSContext* cx, JSObject* obj, HTTPData* http, char* body, size_t bodylen) { HTTP_HANDLE = curl_easy_init(); curl_easy_setopt(HTTP_HANDLE, CURLOPT_READFUNCTION, send_body); - curl_easy_setopt(HTTP_HANDLE, CURLOPT_SEEKFUNCTION, seek_body); + curl_easy_setopt(HTTP_HANDLE, CURLOPT_SEEKFUNCTION, + (curl_seek_callback) seek_body); curl_easy_setopt(HTTP_HANDLE, CURLOPT_HEADERFUNCTION, recv_header); curl_easy_setopt(HTTP_HANDLE, CURLOPT_WRITEFUNCTION, recv_body); curl_easy_setopt(HTTP_HANDLE, CURLOPT_NOPROGRESS, 1); -- cgit v1.2.3