Browse code

rtpengine: normalise `compat.h` handling towards bencode upstream

fixes #1885

Richard Fuchs authored on 11/03/2019 11:52:58
Showing 2 changed files
... ...
@@ -4,24 +4,7 @@
4 4
 #include <sys/uio.h>
5 5
 #include <string.h>
6 6
 
7
-#if defined(PKG_MALLOC) || defined(pkg_malloc)
8
-/* kamailio */
9
-# include "../../core/mem/mem.h"
10
-# include "../../core/str.h"
11
-# ifndef BENCODE_MALLOC
12
-# define BENCODE_MALLOC pkg_malloc
13
-# define BENCODE_FREE pkg_free
14
-# endif
15
-# define INLINE static inline
16
-#else
17
-/* rtpengine */
18
-# include "compat.h"
19
-# include "str.h"
20
-# ifndef BENCODE_MALLOC
21
-# define BENCODE_MALLOC malloc
22
-# define BENCODE_FREE free
23
-# endif
24
-#endif
7
+#include "compat.h"
25 8
 
26 9
 struct bencode_buffer;
27 10
 enum bencode_type;
28 11
new file mode 100644
... ...
@@ -0,0 +1,12 @@
0
+#ifndef __COMPAT__H__
1
+#define __COMPAT__H__
2
+
3
+#include "../../core/mem/mem.h"
4
+#include "../../core/str.h"
5
+#ifndef BENCODE_MALLOC
6
+#define BENCODE_MALLOC pkg_malloc
7
+#define BENCODE_FREE pkg_free
8
+#endif
9
+#define INLINE static inline
10
+
11
+#endif