Changeset dfef05d for lib/trace.c


Ignore:
Timestamp:
08/12/04 14:34:54 (17 years ago)
Author:
Daniel Lawson <dlawson@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
a4ce365
Parents:
476df56
Message:

fixes for AMD64

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/trace.c

    r476df56 rdfef05d  
    6060#include <time.h>
    6161#include <sys/ioctl.h>
     62
     63#include <stdint.h>
     64#ifdef HAVE_STDDEF_H
     65#include <stddef.h>
     66#else
     67# error "Can't find stddef.h - do you define ptrdiff_t elsewhere"
     68#endif
    6269
    6370#include "libtrace.h"
     
    690697        }
    691698        if (ipptr->ip_p == 6) {
    692                 tcpptr = (struct libtrace_tcp *)((int)ipptr + (ipptr->ip_hl * 4));
     699                tcpptr = (struct libtrace_tcp *)((ptrdiff_t)ipptr + (ipptr->ip_hl * 4));
    693700        }
    694701        return tcpptr;
     
    710717        }
    711718        if (ipptr->ip_p == 17) {
    712                 udpptr = (struct libtrace_udp *)((int)ipptr + (ipptr->ip_hl * 4));
     719                udpptr = (struct libtrace_udp *)((ptrdiff_t)ipptr + (ipptr->ip_hl * 4));
    713720        }
    714721        return udpptr;
     
    730737        }
    731738        if (ipptr->ip_p == 1) {
    732                 icmpptr = (struct libtrace_icmp *)((int)ipptr + (ipptr->ip_hl * 4));
     739                icmpptr = (struct libtrace_icmp *)((ptrdiff_t)ipptr + (ipptr->ip_hl * 4));
    733740        }
    734741        return icmpptr;
Note: See TracChangeset for help on using the changeset viewer.