aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncaen <mail@duncano.de>2017-06-15 21:06:40 +0200
committerDuncaen <mail@duncano.de>2017-06-15 21:06:55 +0200
commit66d931479ee07220b42914e7af4ec43ea52fdd75 (patch)
treeafe33cc7d7e87f873590a3dff7eb0017a45a194d
parent53f9101a113ec1693a519594a2ccaab32efc7c62 (diff)
downloadlobase-66d931479ee07220b42914e7af4ec43ea52fdd75.tar.gz
usr.bin/ftp: some fixes, mark broken
-rw-r--r--usr.bin/Makefile2
-rw-r--r--usr.bin/ftp/cmds.c3
-rw-r--r--usr.bin/ftp/complete.c2
-rw-r--r--usr.bin/ftp/cookie.c2
-rw-r--r--usr.bin/ftp/fetch.c2
-rw-r--r--usr.bin/ftp/ftp.c1
6 files changed, 10 insertions, 2 deletions
diff --git a/usr.bin/Makefile b/usr.bin/Makefile
index 8511745..b8c151a 100644
--- 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
index b05b8b6..2110190 100644
--- 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
index 5e0b00a..abb6623 100644
--- 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
index 266f24d..f5f34db 100644
--- 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
index 233769e..d119991 100644
--- 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
index b4c17c2..3a3836b 100644
--- 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>