diff options
author | David Bender <codehero@gmail.com> | 2015-01-25 18:57:43 +0100 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2015-01-25 19:21:51 +0100 |
commit | 5bda8c9681e4da5239b83558d6d38061206e2436 (patch) | |
tree | b7ab5b3defdcb8e1bc7040ac511c93db477c6d7c /package/cgic/0003-restore-cgiFormFileGetTempfileName.patch | |
parent | e5da992f20d880e11519c4aa7f712090c68f9dab (diff) | |
download | buildroot-5bda8c9681e4da5239b83558d6d38061206e2436.tar.gz buildroot-5bda8c9681e4da5239b83558d6d38061206e2436.zip |
cgic: new package
Signed-off-by: Dave Bender <bender@benegon.com>
Signed-off-by: David Bender <codehero@gmail.com>
[yann.morin.1998@free.fr: simplify rules to use -C $(@D); do not install
in target/ ; add description to patches; split patches into independent
changes; add hash]
[Thomas: fix minor typos in patch description.]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/cgic/0003-restore-cgiFormFileGetTempfileName.patch')
-rw-r--r-- | package/cgic/0003-restore-cgiFormFileGetTempfileName.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/package/cgic/0003-restore-cgiFormFileGetTempfileName.patch b/package/cgic/0003-restore-cgiFormFileGetTempfileName.patch new file mode 100644 index 0000000000..f66227b6a6 --- /dev/null +++ b/package/cgic/0003-restore-cgiFormFileGetTempfileName.patch @@ -0,0 +1,43 @@ +Restore lost functionality + +Probably-Signed-off-by: Dave Bender <bender@benegon.com> +[yann.morin.1998@free.fr: patch was made by Dave, but he + forgot his SoB line, so I added it] +Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> + +diff -rupN cgic206/cgic.c cgic206_tempfile/cgic.c +--- cgic206/cgic.c 2014-03-16 18:17:11.000000000 -0400 ++++ cgic206_tempfile/cgic.c 2015-01-21 11:58:45.436384908 -0500 +@@ -1278,6 +1278,20 @@ cgiFormResultType cgiFormFileContentType + } + } + ++const char* cgiFormFileGetTempfileName( ++ char* name) ++{ ++ cgiFormEntry *e; ++ e = cgiFormEntryFindFirst(name); ++ if (!e) { ++ return NULL; ++ } else if (!strlen(e->tfileName)) { ++ return NULL; ++ } else { ++ return e->tfileName; ++ } ++} ++ + cgiFormResultType cgiFormFileSize( + char *name, int *sizeP) + { +diff -rupN cgic206/cgic.h cgic206_tempfile/cgic.h +--- cgic206/cgic.h 2014-03-16 18:17:11.000000000 -0400 ++++ cgic206_tempfile/cgic.h 2015-01-21 11:53:02.915148026 -0500 +@@ -141,6 +141,8 @@ extern cgiFormResultType cgiFormRadio( + char *name, char **valuesText, int valuesTotal, + int *result, int defaultV); + ++extern const char* cgiFormFileGetTempfileName(char* name); ++ + /* The paths returned by this function are the original names of files + as reported by the uploading web browser and shoult NOT be + blindly assumed to be "safe" names for server-side use! */ |