Changeset 8c42377


Ignore:
Timestamp:
06/23/14 16:00:14 (6 years ago)
Author:
Richard Sanger <rsangerarj@…>
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:
5876154, e3a639a
Parents:
014f733
Message:

Fix some BSD warnings/errors

Location:
lib
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • lib/data-struct/deque.c

    rfac8c46 r8c42377  
    33#include <assert.h>
    44#include <stddef.h>
    5 #include <malloc.h>
     5#include <stdlib.h>
    66#include <string.h>
    77
  • lib/data-struct/message_queue.h

    r82facc5 r8c42377  
    66
    77#define LIBTRACE_MQ_FAILED INT_MIN
    8 typedef struct libtrace_thread_t libtrace_thread_t;
    98typedef struct libtrace_message_queue_t {
    109        int pipefd[2];
  • lib/data-struct/vector.h

    rfac8c46 r8c42377  
    77
    88typedef void (*vector_data_fn)(void *data);
    9 typedef struct libtrace_vector {
     9struct libtrace_vector {
    1010        size_t max_size;
    1111        size_t size;
     
    1313        char *elements; // Means we can use array indexing
    1414        pthread_mutex_t lock;
    15 } libtrace_vector_t;
     15};
    1616
    1717DLLEXPORT void libtrace_vector_init(libtrace_vector_t *v, size_t element_size);
  • lib/hash_toeplitz.c

    r29bbef0 r8c42377  
    77 */
    88#include "hash_toeplitz.h"
    9 #include <malloc.h>
    109#include <string.h>
    1110#include <stdlib.h>
  • lib/libtrace.h.in

    r85e87b5 r8c42377  
    203203} libtrace_result_t;
    204204
    205 typedef struct libtrace_message_t libtrace_message_t;
    206 
    207205typedef struct libtrace_thread_t libtrace_thread_t;
    208206
     
    31123110/*@}*/
    31133111
     3112union libtrace_64byte_things {
     3113        void *ptr;
     3114        int64_t sint64;
     3115        uint64_t uint64;
     3116        uint32_t uint32s[2];
     3117        int32_t sint32s[2];
     3118        uint32_t uint32;
     3119        int32_t sint32;
     3120        int sint;
     3121        unsigned int uint;
     3122        char schars[8];
     3123        char uchars[8];
     3124};
     3125
     3126typedef struct libtrace_message_t {
     3127        int code;
     3128        union libtrace_64byte_things additional;
     3129        libtrace_thread_t *sender;
     3130} libtrace_message_t;
     3131
    31143132typedef void* (*fn_per_pkt)(libtrace_t* trace, libtrace_packet_t *p, libtrace_message_t *m, libtrace_thread_t *thread);
    31153133typedef void* (*fn_reducer)(libtrace_t* trace, void* global_blob);
     
    31573175
    31583176DLLEXPORT int retrive_first_packet(libtrace_t *libtrace, libtrace_packet_t **packet, struct timeval **tv);
    3159 
    3160 union libtrace_64byte_things {
    3161         void *ptr;
    3162         int64_t sint64;
    3163         uint64_t uint64;
    3164         uint32_t uint32s[2];
    3165         int32_t sint32s[2];
    3166         uint32_t uint32;
    3167         int32_t sint32;
    3168         int sint;
    3169         unsigned int uint;
    3170         char schars[8];
    3171         char uchars[8];
    3172 };
    3173 
    3174 typedef struct libtrace_message_t {
    3175         int code;
    3176         union libtrace_64byte_things additional;
    3177         libtrace_thread_t *sender;
    3178 } libtrace_message_t;
    31793177
    31803178typedef enum {
  • lib/libtrace_int.h

    rb13b939 r8c42377  
    203203 * Information of this thread
    204204 */
    205 typedef struct libtrace_thread_t {
     205struct libtrace_thread_t {
    206206        libtrace_t * trace;
    207207        void* ret;
     
    225225        // For thread safety reason we actually must store this here
    226226        int64_t tracetime_offset_usec;
    227 } libtrace_thread_t;
     227};
    228228
    229229/**
Note: See TracChangeset for help on using the changeset viewer.