summaryrefslogtreecommitdiff
path: root/debian/patches/1000-fix-mklist-typos.diff
blob: a78c741fe2ec19c09abc37f5ee027db0823633ee (plain)
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
Description: fix mklist typos
 The original mklist.c doesnt compile because of syntax errors and variable
 naming errors.
Author: Johannes Schauer <j.schauer@email.de>
Forwarded: no
Last-Updated: 2021-10-02
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/mklist.c
+++ b/mklist.c
@@ -44,6 +44,7 @@
 #include "alloc.h"
 #include "dir.h"
 #include "conio.h"
+#include <libgen.h>
 
 char   *ProgVer = "mklist  v1.6 20100706  (C) 1999-2010 Lars C. Hassing  lch@ccieurope.com";
 
@@ -53,8 +54,8 @@ int	quiet = 0;
 /*****************************************************************/
 /* Filename length compatibility stuff */
 /*****************************************************************/
-#ifndef _MAX_PATH
-#define _MAX_PATH 256
+#ifndef MAX_PATH
+#define MAX_PATH 256
 #endif
 char    shortfilepath[MAX_PATH];
 char    shortfilename[MAX_PATH];
@@ -84,7 +85,7 @@ int 	namelen = 25; /* LSC specs allow 25
 int GetShortPathName(char *longpath, char * shortpath, int psize)
 {
     strncpy(shortpath, longpath, psize);
-    return(strlen(shortpath);
+    return(strlen(shortpath));
 }
 #endif