From 428db3f37a0a62d34e67da363f54d5923f28146f Mon Sep 17 00:00:00 2001 From: Laurens Valk Date: Sat, 19 Sep 2020 23:40:40 +0200 Subject: [PATCH] mklist: Fix compile errors. Make sure that it compiles with today's GCC. --- mklist/mklist.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mklist/mklist.c b/mklist/mklist.c index 7ee531a8a..12c112bbd 100644 --- a/mklist/mklist.c +++ b/mklist/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 chars in filename. */ int GetShortPathName(char *longpath, char * shortpath, int psize) { strncpy(shortpath, longpath, psize); - return(strlen(shortpath); + return strlen(shortpath); } #endif