Merge lp:~trond-norbye/libmemcached/compile-fixes into lp:~tangent-org/libmemcached/trunk

Proposed by Trond Norbye
Status: Merged
Merge reported by: Brian Aker
Merged at revision: not available
Proposed branch: lp:~trond-norbye/libmemcached/compile-fixes
Merge into: lp:~tangent-org/libmemcached/trunk
Diff against target: 39 lines (+6/-1)
3 files modified
clients/memparse.cc (+1/-1)
libmemcached/common.h (+1/-0)
libmemcached/server.h (+4/-0)
To merge this branch: bzr merge lp:~trond-norbye/libmemcached/compile-fixes
Reviewer Review Type Date Requested Status
Libmemcached-developers Pending
Review via email: mp+69754@code.launchpad.net

Description of the change

Minor compile fixes:

1) The code does not compile on Solaris 10 due to missing include files. The function index() is used in parser.cc, and according to the man page one should include <strings.h>. One of the client programs use strlen without including <cstring>

2) libmemcached/server.h that is installed as part of the client installation use NI_MAXHOST in the structure definition, but without including netdb.h that defines it. By doing so the clients of libmemcached would have to include netdb.h before including libmemcached/memcached.h.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'clients/memparse.cc'
2--- clients/memparse.cc 2011-07-26 19:06:05 +0000
3+++ clients/memparse.cc 2011-07-29 08:16:07 +0000
4@@ -38,7 +38,7 @@
5 #include <config.h>
6
7 #include <iostream>
8-
9+#include <cstring>
10 #include <libmemcached/memcached.h>
11
12 int main(int argc, char *argv[])
13
14=== modified file 'libmemcached/common.h'
15--- libmemcached/common.h 2011-07-20 01:03:38 +0000
16+++ libmemcached/common.h 2011-07-29 08:16:07 +0000
17@@ -62,6 +62,7 @@
18 #include <limits.h>
19 #include <sys/types.h>
20 #include <unistd.h>
21+#include <strings.h>
22
23 #include <libmemcached/memcached.h>
24 #include <libmemcached/watchpoint.h>
25
26=== modified file 'libmemcached/server.h'
27--- libmemcached/server.h 2011-07-18 17:54:02 +0000
28+++ libmemcached/server.h 2011-07-29 08:16:07 +0000
29@@ -38,6 +38,10 @@
30
31 #pragma once
32
33+#ifndef WIN32
34+#include <netdb.h>
35+#endif
36+
37 enum memcached_server_state_t {
38 MEMCACHED_SERVER_STATE_NEW, // fd == -1, no address lookup has been done
39 MEMCACHED_SERVER_STATE_ADDRINFO, // ADDRRESS information has been gathered

Subscribers

People subscribed via source and target branches

to all changes: