Stop using non-portable <sys/param.h> There are platforms without <sys/param.h>, so we better avoid the header altogether, and add the required MIN macro outselves. Based-on-patch-by: Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
diff --git a/configure.ac b/configure.ac
index 9baffad..d3e6a24 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,7 +32,6 @@ AC_PROG_CC
# Checks for libraries.
# Checks for header files.
-AC_CHECK_HEADERS([sys/param.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_BIGENDIAN
diff --git a/src/helper.c b/src/helper.c
index b0875bd..2a06503 100644
--- a/src/helper.c
+++ b/src/helper.c
@@ -11,7 +11,6 @@
#include <config.h>
-#include <sys/param.h>
#include <sys/stat.h>
#include <errno.h>
@@ -23,6 +22,10 @@
#include <hashinc>
+#ifndef MIN
+# define MIN(x, y) (((x) < (y)) ? (x) : (y))
+#endif
+
/* ARGSUSED */
char *
HASHEnd(HASH_CTX *ctx, char *buf)
diff --git a/src/sha1.c b/src/sha1.c
index 2f04b82..2eacabe 100644
--- a/src/sha1.c
+++ b/src/sha1.c
@@ -16,7 +16,6 @@
#include <config.h>
-#include <sys/param.h>
#include <string.h>
#include <sha1.h>