This commit creates a macro for fwrite_unlocked which is probed during
configuration time.
AC_CHECK_FUNCS([gettimeofday clock_gettime utime strptime tzset localtime_r])
AC_CHECK_FUNCS([socket setenv select putenv dup2 endgrent endpwent atexit munmap])
+ AC_CHECK_FUNCS([fwrite_unlocked])
+
AC_CHECK_DECL([getrandom],
AC_DEFINE([HAVE_GETRANDOM], [1], [Use getrandom]),
[], [
char *strptime(const char * __restrict, const char * __restrict, struct tm * __restrict);
#endif
+#ifndef HAVE_FWRITE_UNLOCKED
+#define SCFwriteUnlocked fwrite
+#else
+#define SCFwriteUnlocked fwrite_unlocked
+#endif
extern int coverage_unittests;
extern int g_ut_modules;
extern int g_ut_covered;