Don't include system headers within an extern C block
[m6w6/libmemcached] / example / interface_v1.c
index 3de38542100412ce9f49a26a5858bc38841ced7c..36c0468b28e65b8be047e578217b39295c9c5bde 100644 (file)
@@ -11,9 +11,6 @@
 #include "config.h"
 #include <assert.h>
 #include <sys/types.h>
-#include <sys/socket.h>
-#include <netdb.h>
-#include <netinet/tcp.h>
 #include <stdio.h>
 #include <unistd.h>
 #include <fcntl.h>
@@ -65,7 +62,8 @@ static protocol_binary_response_status append_handler(const void *cookie,
                                                       const void* val,
                                                       uint32_t vallen,
                                                       uint64_t cas,
-                                                      uint64_t *result_cas) {
+                                                      uint64_t *result_cas)
+{
   (void)cookie;
   protocol_binary_response_status rval= PROTOCOL_BINARY_RESPONSE_SUCCESS;
 
@@ -393,7 +391,7 @@ static protocol_binary_response_status version_handler(const void *cookie,
 }
 
 memcached_binary_protocol_callback_st interface_v1_impl= {
-  .interface_version= 1,
+  .interface_version= MEMCACHED_PROTOCOL_HANDLER_V1,
   .interface.v1= {
     .add= add_handler,
     .append= append_handler,