diff --git a/usr.bin/elfctl/elfctl.c b/usr.bin/elfctl/elfctl.c --- a/usr.bin/elfctl/elfctl.c +++ b/usr.bin/elfctl/elfctl.c @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include @@ -255,7 +256,7 @@ val = strtol(feature, &eptr, 0); if (eptr == feature || *eptr != '\0') errno = EINVAL; - else if (val > UINT_MAX) + else if ((unsigned long)val > UINT32_MAX) errno = ERANGE; if (errno != 0) { warn("%s invalid", feature);