summaryrefslogtreecommitdiff
path: root/src/couchdb
diff options
context:
space:
mode:
authorJan Lehnardt <jan@apache.org>2010-06-15 16:27:22 +0000
committerJan Lehnardt <jan@apache.org>2010-06-15 16:27:22 +0000
commite421789386d4f621ddbb1a107278f7843b3042c8 (patch)
treec8b7de744fa38d5a15c3f6a436236756ed5e4498 /src/couchdb
parentf0297fac1f55baf4bc6cdeb7ed6cc732b2df843b (diff)
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
Diffstat (limited to 'src/couchdb')
-rw-r--r--src/couchdb/priv/Makefile.am2
-rw-r--r--src/couchdb/priv/couch_js/http.c4
2 files changed, 4 insertions, 2 deletions
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 <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <jsapi.h>
@@ -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);