Adding Gnulib include directory causes some conflict through indirect
include of <pthread.h>. As sanity-cpp.cpp only uses MIN macro, we can
simply define it by ourselves instead of including <minmax.h>.
Signed-off-by: Daiki Ueno <ueno@gnu.org>
sanity_cpp_SOURCES = sanity-cpp.cpp
sanity_cpp_LDADD = $(CMOCKA_LDADD)
-sanity_cpp_CXXFLAGS = $(AM_CPPFLAGS) \
- -I$(top_srcdir)/gl \
- -I$(top_builddir)/gl
+sanity_cpp_CXXFLAGS = $(AM_CPPFLAGS) $(CMOCKA_CFLAGS)
endif
endif
#include "cert-common.h"
#include <setjmp.h>
#include <cmocka.h>
-#include <minmax.h>
+#undef MIN
+#define MIN(x,y) (x > y ? y : x)
}
/* This is a basic test for C++ API */