Ignore:
Timestamp:
04/08/06 16:31:40 (16 years ago)
Author:
Perry Lorier <perry@…>
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:
689c220
Parents:
23971d0
Message:

WIN32 compile fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_legacy.c

    r68155f1 r33e1501  
    3737#include "parse_cmd.h"
    3838
    39 #ifdef HAVE_INTTYPES_H
    40 #  include <inttypes.h>
    41 #else
    42 #  error "Can't find inttypes.h - this needs to be fixed"
    43 #endif
    44 
    45 #ifdef HAVE_STDDEF_H
    46 #  include <stddef.h>
    47 #else
    48 # error "Can't find stddef.h - do you define ptrdiff_t elsewhere?"
    49 #endif
    50 #include <sys/types.h>
    51 #include <sys/socket.h>
    52 #include <sys/un.h>
    53 #include <sys/mman.h>
    5439#include <sys/stat.h>
    55 #include <unistd.h>
    5640#include <assert.h>
    5741#include <errno.h>
    58 #include <netdb.h>
    5942#include <fcntl.h>
    6043#include <stdio.h>
     
    6245#include <stdlib.h>
    6346
    64 
    65 #define COLLECTOR_PORT 3435
     47#ifdef WIN32
     48#  include <io.h>
     49#  include <share.h>
     50#  define snprintf sprintf_s
     51#endif
     52
    6653
    6754/* Catch undefined O_LARGEFILE on *BSD etc */
     
    182169}
    183170
    184 static int legacy_get_capture_length(const struct libtrace_packet_t *packet __attribute__((unused))) {
     171static int legacy_get_capture_length(const struct libtrace_packet_t *packet UNUSED) {
    185172        return 64;
    186173}
     
    345332
    346333       
    347 static void __attribute__((constructor)) legacy_constructor() {
     334static void CONSTRUCTOR legacy_constructor() {
    348335        register_format(&legacypos);
    349336        register_format(&legacyeth);
Note: See TracChangeset for help on using the changeset viewer.