Linux (such as Ubuntu 12.04LTS) that don't have it yet. Seems the AT_XXX
defines are pulled in by <link.h> now.
ok beck@
-/* $OpenBSD: getentropy_linux.c,v 1.24 2014/07/13 13:37:38 deraadt Exp $ */
+/* $OpenBSD: getentropy_linux.c,v 1.25 2014/07/16 14:26:47 kettenis Exp $ */
/*
* Copyright (c) 2014 Theo de Raadt <deraadt@openbsd.org>
HD(cnt);
}
+#ifdef HAVE_GETAUXVAL
#ifdef AT_RANDOM
/* Not as random as you think but we take what we are given */
p = (char *) getauxval(AT_RANDOM);
p = (char *) getauxval(AT_BASE);
if (p)
HD(p);
+#endif
#endif
SHA512_Final(results, &ctx);
-/* $OpenBSD: getentropy_linux.c,v 1.24 2014/07/13 13:37:38 deraadt Exp $ */
+/* $OpenBSD: getentropy_linux.c,v 1.25 2014/07/16 14:26:47 kettenis Exp $ */
/*
* Copyright (c) 2014 Theo de Raadt <deraadt@openbsd.org>
HD(cnt);
}
+#ifdef HAVE_GETAUXVAL
#ifdef AT_RANDOM
/* Not as random as you think but we take what we are given */
p = (char *) getauxval(AT_RANDOM);
p = (char *) getauxval(AT_BASE);
if (p)
HD(p);
+#endif
#endif
SHA512_Final(results, &ctx);