kvm: Fix framebuffer dirty log sync
[qemu] / nbd.c
diff --git a/nbd.c b/nbd.c
index 5b5f760..b397a5f 100644 (file)
--- a/nbd.c
+++ b/nbd.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA  02110-1301 USA
  */
 
 #include "nbd.h"
@@ -169,7 +169,8 @@ int tcp_socket_incoming(const char *address, uint16_t port)
     memcpy(&addr.sin_addr.s_addr, &in, sizeof(in));
 
     opt = 1;
-    if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)) == -1) {
+    if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR,
+                   (const void *) &opt, sizeof(opt)) == -1) {
         goto error;
     }
 
@@ -579,7 +580,7 @@ int nbd_trip(BlockDriverState *bs, int csock, off_t size, uint64_t dev_offset,
        if ((request.from + request.len) > size) {
                LOG("From: %" PRIu64 ", Len: %u, Size: %" PRIu64
                    ", Offset: %" PRIu64 "\n",
-                    request.from, request.len, size, dev_offset);
+                    request.from, request.len, (uint64_t)size, dev_offset);
                LOG("requested operation past EOF--bad client?");
                errno = EINVAL;
                return -1;