[PATCH] seedrng: prune header includes
Jason A. Donenfeld
Jason at zx2c4.com
Thu Apr 21 12:34:29 UTC 2022
I'm not a huge fan of this, but Bernhard seems to prefer it: since
libbb.h contains most the headers we use, we can remove them from
seedrng.c. Supposedly this helps with compile times, but I couldn't
actually detect a difference. Oh well. Please keep this as a separate
patch so that we can revert this later on if somebody else winces too.
Hopefully this doesn't cause compiler warnings on other toolchains.
Signed-off-by: Jason A. Donenfeld <Jason at zx2c4.com>
---
util-linux/seedrng.c | 14 --------------
1 file changed, 14 deletions(-)
diff --git a/util-linux/seedrng.c b/util-linux/seedrng.c
index 374e7f676..f7434fb79 100644
--- a/util-linux/seedrng.c
+++ b/util-linux/seedrng.c
@@ -44,21 +44,7 @@
#include <linux/random.h>
#include <sys/random.h>
-#include <sys/ioctl.h>
#include <sys/file.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <fcntl.h>
-#include <poll.h>
-#include <unistd.h>
-#include <time.h>
-#include <errno.h>
-#include <endian.h>
-#include <stdbool.h>
-#include <stdint.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
#ifndef GRND_INSECURE
#define GRND_INSECURE 0x0004 /* Apparently some headers don't ship with this yet. */
--
2.35.1
More information about the busybox
mailing list