Revision e0efb993

b/cpus.c
278 278

  
279 279
static void qemu_event_read(void *opaque)
280 280
{
281
    int fd = (unsigned long)opaque;
281
    int fd = (intptr_t)opaque;
282 282
    ssize_t len;
283 283
    char buffer[512];
284 284

  
......
306 306
        goto fail;
307 307
    }
308 308
    qemu_set_fd_handler2(fds[0], NULL, qemu_event_read, NULL,
309
                         (void *)(unsigned long)fds[0]);
309
                         (void *)(intptr_t)fds[0]);
310 310

  
311 311
    io_thread_fd = fds[1];
312 312
    return 0;
......
327 327
 */
328 328
static void sigfd_handler(void *opaque)
329 329
{
330
    int fd = (unsigned long) opaque;
330
    int fd = (intptr_t)opaque;
331 331
    struct qemu_signalfd_siginfo info;
332 332
    struct sigaction action;
333 333
    ssize_t len;
......
395 395
    fcntl_setfl(sigfd, O_NONBLOCK);
396 396

  
397 397
    qemu_set_fd_handler2(sigfd, NULL, sigfd_handler, NULL,
398
                         (void *)(unsigned long) sigfd);
398
                         (void *)(intptr_t)sigfd);
399 399

  
400 400
    return 0;
401 401
}
b/migration-tcp.c
139 139
{
140 140
    struct sockaddr_in addr;
141 141
    socklen_t addrlen = sizeof(addr);
142
    int s = (unsigned long)opaque;
142
    int s = (intptr_t)opaque;
143 143
    QEMUFile *f;
144 144
    int c;
145 145

  
......
194 194
        goto err;
195 195

  
196 196
    qemu_set_fd_handler2(s, NULL, tcp_accept_incoming_migration, NULL,
197
                         (void *)(unsigned long)s);
197
                         (void *)(intptr_t)s);
198 198

  
199 199
    return 0;
200 200

  
b/migration-unix.c
147 147
{
148 148
    struct sockaddr_un addr;
149 149
    socklen_t addrlen = sizeof(addr);
150
    int s = (unsigned long)opaque;
150
    int s = (intptr_t)opaque;
151 151
    QEMUFile *f;
152 152
    int c;
153 153

  
......
204 204
    }
205 205

  
206 206
    qemu_set_fd_handler2(sock, NULL, unix_accept_incoming_migration, NULL,
207
			 (void *)(unsigned long)sock);
207
			 (void *)(intptr_t)sock);
208 208

  
209 209
    return 0;
210 210

  
b/qemu-char.c
1376 1376
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
1377 1377
static int pp_ioctl(CharDriverState *chr, int cmd, void *arg)
1378 1378
{
1379
    int fd = (int)(long)chr->opaque;
1379
    int fd = (int)(intptr_t)chr->opaque;
1380 1380
    uint8_t b;
1381 1381

  
1382 1382
    switch(cmd) {
......
1422 1422
        return NULL;
1423 1423

  
1424 1424
    chr = qemu_mallocz(sizeof(CharDriverState));
1425
    chr->opaque = (void *)(long)fd;
1425
    chr->opaque = (void *)(intptr_t)fd;
1426 1426
    chr->chr_write = null_chr_write;
1427 1427
    chr->chr_ioctl = pp_ioctl;
1428 1428
    return chr;

Also available in: Unified diff