lobase

Linux port of OpenBSDs userland.
Log | Files | Refs | README

commit 66d931479ee07220b42914e7af4ec43ea52fdd75
parent 53f9101a113ec1693a519594a2ccaab32efc7c62
Author: Duncaen <mail@duncano.de>
Date:   Thu, 15 Jun 2017 21:06:40 +0200

usr.bin/ftp: some fixes, mark broken

Diffstat:
usr.bin/Makefile | 2+-
usr.bin/ftp/cmds.c | 3+++
usr.bin/ftp/complete.c | 2+-
usr.bin/ftp/cookie.c | 2++
usr.bin/ftp/fetch.c | 2++
usr.bin/ftp/ftp.c | 1+
6 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/usr.bin/Makefile b/usr.bin/Makefile @@ -6,5 +6,5 @@ SUBDIR= apply awk basename bc biff cal calendar cmp colrm col column comm \ rs sed shar sort spell split stat tee time touch tr true tsort tty ul \ units uname unexpand uniq unvis uudecode uuencode vis wc what which \ xinstall htpasswd cu newsyslog sdiff banner -SKIPDIR=file cu +SKIPDIR=file ftp cu include ${.TOPDIR}/mk/bsd.subdir.mk diff --git a/usr.bin/ftp/cmds.c b/usr.bin/ftp/cmds.c @@ -59,6 +59,8 @@ * SUCH DAMAGE. */ +#define _GNU_SOURCE /* for asprintf */ + #ifndef SMALL /* @@ -78,6 +80,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <time.h> #include <unistd.h> #include <errno.h> diff --git a/usr.bin/ftp/complete.c b/usr.bin/ftp/complete.c @@ -179,7 +179,7 @@ complete_local(char *word, int list) for (dp = readdir(dd); dp != NULL; dp = readdir(dd)) { if (!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, "..")) continue; - if (strlen(file) > dp->d_namlen) + if (strlen(file) > D_NAMLEN(dp)) continue; if (strncmp(file, dp->d_name, strlen(file)) == 0) { char *tcp; diff --git a/usr.bin/ftp/cookie.c b/usr.bin/ftp/cookie.c @@ -16,6 +16,8 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#define _GNU_SOURCE /* for asprintf */ + #ifndef SMALL #include <sys/types.h> diff --git a/usr.bin/ftp/fetch.c b/usr.bin/ftp/fetch.c @@ -34,6 +34,8 @@ * FTP User Program -- Command line file retrieval */ +#define _GNU_SOURCE /* for asprintf, vasprintf */ + #include <sys/types.h> #include <sys/socket.h> #include <sys/stat.h> diff --git a/usr.bin/ftp/ftp.c b/usr.bin/ftp/ftp.c @@ -78,6 +78,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <time.h> #include <unistd.h> #include <utime.h>