Changeset 10553bf


Ignore:
Timestamp:
09/25/15 14:31:28 (5 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, 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:
26c2d4c
Parents:
6fac5db
Message:

Fix various build errors and warnings on OS X

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • examples/parallel/network_capture.c

    r624c2da r10553bf  
    1717#include <inttypes.h>
    1818#include <signal.h>
    19 #include <malloc.h>
    2019#include <getopt.h>
    2120#include <stdlib.h>
  • lib/data-struct/sliding_window.c

    r5ba34eb r10553bf  
    5858}
    5959
     60/*
    6061static inline uint64_t libtrace_slidingwindow_get_min_number(libtrace_slidingwindow_t *sw) {
    6162        return sw->start_number;
    6263}
     64*/
    6365
    6466uint64_t libtrace_slidingwindow_read_ready(libtrace_slidingwindow_t *sw) {
  • lib/format_bpf.c

    r5478d3d r10553bf  
    371371                case TRACE_OPTION_EVENT_REALTIME:
    372372                        /* Captures are always realtime */
     373                        break;
     374                case TRACE_OPTION_HASHER:
     375                        /* TODO investigate hashing in BSD? */
    373376                        break;
    374377
  • lib/pthread_spinlock.c

    rac6ac7f r10553bf  
    7070                return EINVAL;
    7171        *lock = OS_SPINLOCK_INIT;
     72        (void)pshared;
    7273        return 0;
    7374}
  • lib/trace_parallel.c

    r389dd77 r10553bf  
    8282#include "libtrace_parallel.h"
    8383
    84 #ifdef HAVE_PCAP_BPF_H
    85 #  include <pcap-bpf.h>
     84#ifdef HAVE_NET_BPF_H
     85#  include <net/bpf.h>
    8686#else
    87 #  ifdef HAVE_NET_BPF_H
    88 #    include <net/bpf.h>
     87#  ifdef HAVE_PCAP_BPF_H
     88#    include <pcap-bpf.h>
    8989#  endif
    9090#endif
     
    602602        libtrace_t *trace = (libtrace_t *)data;
    603603        libtrace_thread_t *t;
    604         libtrace_message_t message = {0};
     604        libtrace_message_t message = {0, {.uint64=0}, NULL};
    605605        libtrace_packet_t *packets[trace->config.burst_size];
    606606        size_t i;
     
    761761        int i;
    762762        libtrace_packet_t * packet;
    763         libtrace_message_t message = {0};
     763        libtrace_message_t message = {0, {.uint64=0}, NULL};
    764764        int pkt_skipped = 0;
    765765
     
    987987{
    988988        if (!t->recorded_first) {
    989                 libtrace_message_t mesg = {0};
     989                libtrace_message_t mesg = {0, {.uint64=0}, NULL};
    990990                struct timeval tv;
    991991                libtrace_packet_t * dup;
     
    10841084/** Similar to delay_tracetime but send messages to all threads periodically */
    10851085static void* reporter_entry(void *data) {
    1086         libtrace_message_t message = {0};
     1086        libtrace_message_t message = {0, {.uint64=0}, NULL};
    10871087        libtrace_t *trace = (libtrace_t *)data;
    10881088        libtrace_thread_t *t = &trace->reporter_thread;
     
    11461146static void* keepalive_entry(void *data) {
    11471147        struct timeval prev, next;
    1148         libtrace_message_t message = {0};
     1148        libtrace_message_t message = {0, {.uint64=0}, NULL};
    11491149        libtrace_t *trace = (libtrace_t *)data;
    11501150        uint64_t next_release;
     
    15141514        pthread_attr_t attrib;
    15151515        cpu_set_t cpus;
     1516        int i;
    15161517#endif
    1517         int ret, i;
     1518        int ret;
    15181519        assert(t->type == THREAD_EMPTY);
    15191520        t->trace = trace;
     
    15221523        t->type = type;
    15231524        t->state = THREAD_RUNNING;
     1525
     1526        assert(name);
    15241527
    15251528#ifdef __linux__
     
    19691972                if (libtrace->config.debug_state)
    19701973                        fprintf(stderr, "Hasher thread is running, asking it to pause ...");
    1971                 libtrace_message_t message = {0};
     1974                libtrace_message_t message = {0, {.uint64=0}, NULL};
    19721975                message.code = MESSAGE_DO_PAUSE;
    19731976                trace_message_thread(libtrace, &libtrace->hasher_thread, &message);
     
    19871990        for (i = 0; i < libtrace->perpkt_thread_count; i++) {
    19881991                if (&libtrace->perpkt_threads[i] != t) {
    1989                         libtrace_message_t message = {0};
     1992                        libtrace_message_t message = {0, {.uint64=0}, NULL};
    19901993                        message.code = MESSAGE_DO_PAUSE;
    19911994                        ASSERT_RET(trace_message_thread(libtrace, &libtrace->perpkt_threads[i], &message), != -1);
     
    20302033               
    20312034                } else {
    2032                         libtrace_message_t message = {0};
     2035                        libtrace_message_t message = {0, {.uint64=0}, NULL};
    20332036                        message.code = MESSAGE_DO_PAUSE;
    20342037                        trace_message_thread(libtrace, &libtrace->reporter_thread, &message);
     
    20772080{
    20782081        int i, err;
    2079         libtrace_message_t message = {0};
     2082        libtrace_message_t message = {0, {.uint64=0}, NULL};
    20802083        assert(libtrace);
    20812084
     
    22032206        // Wait for the tick (keepalive) thread if it has been started
    22042207        if (libtrace->keepalive_thread.type == THREAD_KEEPALIVE) {
    2205                 libtrace_message_t msg = {0};
     2208                libtrace_message_t msg = {0, {.uint64=0}, NULL};
    22062209                msg.code = MESSAGE_DO_STOP;
    22072210                trace_message_thread(libtrace, &libtrace->keepalive_thread, &msg);
     
    22742277DLLEXPORT int trace_post_reporter(libtrace_t *libtrace)
    22752278{
    2276         libtrace_message_t message = {0};
     2279        libtrace_message_t message = {0, {.uint64=0}, NULL};
    22772280        message.code = MESSAGE_POST_REPORTER;
    22782281        return trace_message_reporter(libtrace, (void *) &message);
  • tools/traceanon/Makefile.am

    rebb54a5 r10553bf  
    88traceanon_SOURCES = traceanon.cc Anon.cc Anon.h
    99
    10 traceanon_CPPFLAGS = $(AM_CPPFLAGS)
     10# Stupid Apple decided to deprecate the low-level OpenSSL EVP functions
     11traceanon_CPPFLAGS = $(AM_CPPFLAGS) -Wno-deprecated-declarations
Note: See TracChangeset for help on using the changeset viewer.