mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 17:33:09 +00:00
7046f09fe4
Failing Hydra build: https://hydra.nixos.org/build/193323749
30 lines
772 B
Diff
30 lines
772 B
Diff
On glibc-2.36 this fails with
|
|
|
|
genauth.c:45:12: fatal error: bsd/stdlib.h: No such file or directory
|
|
45 | # include <bsd/stdlib.h>
|
|
| ^~~~~~~~~~~~~~
|
|
|
|
This is because the file will be included if HAVE_ARC4RANDOM is true and `__linux__` is set.
|
|
However, this is wrong: arc4random is now defined in glibc-2.36 and thus stdlib.h must be included
|
|
even though HAVE_ARC4RANDOM is true.
|
|
|
|
diff --git a/xdm/genauth.c b/xdm/genauth.c
|
|
index cd2ad61..74d0ae1 100644
|
|
--- a/xdm/genauth.c
|
|
+++ b/xdm/genauth.c
|
|
@@ -40,13 +40,7 @@ from The Open Group.
|
|
|
|
#include <errno.h>
|
|
|
|
-#ifdef HAVE_ARC4RANDOM
|
|
-# ifdef __linux__
|
|
-# include <bsd/stdlib.h>
|
|
-# else
|
|
-# include <stdlib.h>
|
|
-# endif
|
|
-#endif
|
|
+#include <stdlib.h>
|
|
|
|
#include <time.h>
|
|
#define Time_t time_t
|