#define calloc _afscrypto_calloc
void * _afscrypto_calloc(int, size_t);
+#ifdef malloc
+# undef malloc
+#endif
#define malloc _afscrypto_malloc
void * _afscrypto_malloc(size_t);
#if defined(HAVE_GETUID)
#undef HAVE_GETUID
#endif
+#ifdef HAVE_ARC4RANDOM
+# undef HAVE_ARC4RANDOM
+#endif
+
+#if !defined(AFS_LINUX26_ENV)
+/*
+ * gettimeofday is only used in rand-fortuna.c, not built for Linux.
+ * Linux 5.6 removes the native struct timeval, so this stub would not build.
+ */
static_inline int gettimeofday(struct timeval *tp, void *tzp)
{if (tp == NULL) return -1; tp->tv_sec = osi_Time(); tp->tv_usec = 0; return 0;}
+#endif
#if defined(KERNEL) && (defined(AFS_SUN5_ENV) || defined(AFS_ARM64_LINUX26_ENV))
/*