Skip to content

Commit 82cdaeb

Browse files
committed
core: fix includes in utils.c
#include <ipfixcol2.h> resulted in including a file in which be64toh/htobe64 functions were used. This would clash with the defines present here that are necessary to get the wanted strerror_r function, resulting in the be64toh/htobe64 functions being undefined. This was fixed by not including ipfixcol2.h as a whole, but only the necessary part, as well as adding explicit includes for the system headers that were brought by ipfixcol2.h.
1 parent 97617d2 commit 82cdaeb

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/core/utils.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,13 @@
4646

4747
#include <errno.h>
4848
#include <limits.h>
49+
#include <stdbool.h>
50+
#include <stdio.h>
4951
#include <stdlib.h>
5052
#include <string.h>
53+
#include <sys/stat.h>
5154

52-
#include "utils.h"
55+
#include <ipfixcol2/api.h>
5356

5457

5558
int

src/core/utils.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@
4545
extern "C" {
4646
#endif
4747

48-
#include <ipfixcol2.h>
49-
5048
#ifdef __cplusplus
5149
}
5250
#endif

0 commit comments

Comments
 (0)