normalise compat.h handling towards kamailio tree

Change-Id: Ia22a603c11b216969f4c0a854af42600a99a2819
changes/15/27915/2
Richard Fuchs 7 years ago
parent 9eea6b1fc4
commit 41cddcc293

@ -4,24 +4,7 @@
#include <sys/uio.h>
#include <string.h>
#if defined(SHM_MEM) || defined(PKG_MALLOC) || defined(pkg_malloc)
/* kamailio */
# include "../../mem/mem.h"
# include "../../str.h"
# ifndef BENCODE_MALLOC
# define BENCODE_MALLOC pkg_malloc
# define BENCODE_FREE pkg_free
# endif
# define INLINE static inline
#else
/* rtpengine */
# include "compat.h"
# include "str.h"
# ifndef BENCODE_MALLOC
# define BENCODE_MALLOC malloc
# define BENCODE_FREE free
# endif
#endif
#include "compat.h"
struct bencode_buffer;
enum bencode_type;

@ -7,4 +7,12 @@
# define INLINE static inline __attribute__((always_inline))
#endif
#ifndef BENCODE_MALLOC
#define BENCODE_MALLOC malloc
#define BENCODE_FREE free
#endif
#include "str.h"
#endif

Loading…
Cancel
Save