Already showing its worth: a few ac checks were missing.
PDNS_FROM_GIT
dnl Checks for library functions.
-AC_CHECK_FUNCS_ONCE([strcasestr localtime_r recvmmsg sched_setscheduler getrandom arc4random])
+dnl the *_r functions are in posix so we can use them unconditionally, but the ext/yahttp code is
+dnl using the defines.
+AC_CHECK_FUNCS_ONCE([strcasestr localtime_r gmtime_r recvmmsg sched_setscheduler getrandom arc4random])
AM_CONDITIONAL([HAVE_RECVMMSG], [test "x$ac_cv_func_recvmmsg" = "xyes"])
fromTm(&tm);
#else
struct tm *tm;
- tm = localtime(&t);
+ #error define HAVE_LOCALTIME_R
+ tm = localtime(&t); // lgtm [cpp/potentially-dangerous-function]
fromTm(tm);
#endif
#ifndef HAVE_TM_GMTOFF
gmtime_r(&t, &tm);
t2 = mktime(&tm);
# else
- tm = gmtime(&t);
+ #error define HAVE_LOCALTIME_R
+ tm = gmtime(&t); // lgtm [cpp/potentially-dangerous-function]
t2 = mktime(tm);
# endif
this->utc_offset = ((t2-t)/10)*10; // removes any possible differences.
fromTm(&tm);
#else
struct tm *tm;
- tm = gmtime(&t);
+ #error define HAVE_GMTIME_R
+ tm = gmtime(&t);// lgtm [cpp/potentially-dangerous-function]
fromTm(tm);
#endif
#ifndef HAVE_TM_GMTOFF
AX_CHECK_SYSTEMD_FEATURES
AM_CONDITIONAL([HAVE_SYSTEMD], [ test x"$systemd" = "xy" ])
+dnl the *_r functions are in posix so we can use them unconditionally, but the ext/yahttp code is
+dnl using the defines.
+AC_CHECK_FUNCS_ONCE([localtime_r gmtime_r])
AC_SUBST([YAHTTP_CFLAGS], ['-I$(top_srcdir)/ext/yahttp'])
AC_SUBST([YAHTTP_LIBS], ['$(top_builddir)/ext/yahttp/yahttp/libyahttp.la'])
AC_SUBST([IPCRYPT_CFLAGS], ['-I$(top_srcdir)/ext/ipcrypt'])
PDNS_CHECK_RAGEL([pdns/dnslabeltext.cc], [www.powerdns.com])
PDNS_CHECK_CURL
-AC_CHECK_FUNCS_ONCE([strcasestr getrandom arc4random])
+dnl the *_r functions are in posix so we can use them unconditionally, but the ext/yahttp code is
+dnl using the defines.
+AC_CHECK_FUNCS_ONCE([localtime_r gmtime_r strcasestr getrandom arc4random])
PDNS_CHECK_PTHREAD_NP