lambda-delta: fix build with modern GCC

- Add explicit int return type to main() in lpart.c
- Include <ctype.h> in decode_lmfl.c for tolower()
This commit is contained in:
Ben Siraphob
2025-11-14 03:37:49 -05:00
parent 541cfb092c
commit f8c8a2af34
2 changed files with 27 additions and 0 deletions
@@ -0,0 +1,25 @@
diff --git a/src/lpart.c b/src/lpart.c
index 1234567..abcdefg 100644
--- a/src/lpart.c
+++ b/src/lpart.c
@@ -485,7 +485,7 @@ dump_part(char *partition)
return 0;
}
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
{
char *partition;
int ret;
diff --git a/tools/decode_lmfl.c b/tools/decode_lmfl.c
index 1234567..abcdefg 100644
--- a/tools/decode_lmfl.c
+++ b/tools/decode_lmfl.c
@@ -33,6 +33,7 @@
#include <string.h>
#include <errno.h>
#include <sys/stat.h>
+#include <ctype.h>
/* Globals */
FILE *ifile;
+2
View File
@@ -18,6 +18,8 @@ stdenv.mkDerivation rec {
sha256 = "02m43fj9dzc1i1jl01qwnhjiq1rh03jw1xq59sx2h3bhn7dk941x";
};
patches = [ ./fix-implicit-int.patch ];
nativeBuildInputs = [
autoreconfHook
pkg-config